fix(admin-auth): point forgot-password at the employees endpoint, not users
All checks were successful
build-and-release / build (push) Successful in 57s
All checks were successful
build-and-release / build (push) Successful in 57s
The previous fix routed through /api/gateway/auth/* (the users-table forgot-password), which succeeds but changes the wrong account entirely — admin.nxtgauge.com authenticates against a separate employees table. Backend now exposes /api/admin/auth/forgot-password and /api/admin/auth/reset-password against EmployeeRepository; route there. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
eb6baf037b
commit
87fe3c0c59
1 changed files with 2 additions and 2 deletions
|
|
@ -91,7 +91,7 @@ export default function LoginPage() {
|
|||
const trimmedEmail = email().trim().toLowerCase();
|
||||
setIsSubmitting(true);
|
||||
try {
|
||||
const r = await fetch('/api/gateway/auth/forgot-password', {
|
||||
const r = await fetch('/api/admin/auth/forgot-password', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
|
||||
body: JSON.stringify({ email: trimmedEmail }),
|
||||
|
|
@ -116,7 +116,7 @@ export default function LoginPage() {
|
|||
if (newPassword().trim() !== confirmPassword().trim()) { setError('Passwords do not match.'); return; }
|
||||
setIsSubmitting(true);
|
||||
try {
|
||||
const r = await fetch('/api/gateway/auth/reset-password', {
|
||||
const r = await fetch('/api/admin/auth/reset-password', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
|
||||
body: JSON.stringify({ code: resetCode().trim(), new_password: newPassword().trim() }),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue