fix(quotesdb): atomic update_admin_auth_code, fix handler docstring
Replace the two-step read-check-write in update_admin_auth_code with a single atomic UPDATE … WHERE key = 'admin_auth_code' AND value = ?current in both NativeRepository and D1Repository. Rows-affected count is checked: zero means the code was absent or mismatched → DbError::Forbidden; one means success. Also remove the now-unnecessary replacement2 clone binding in native.rs. Fix the reset_auth_code handler doc comment to accurately describe that a missing X-Admin-Code header is caught by the handler itself (before any DB call), while a wrong-but-present code reaches the DB layer which returns DbError::Forbidden. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
8b301d23bb
commit
37cc5ce443
Loading…
Reference in New Issue