From 87fe3c0c59d9ae147e2b589ca73e9b7d909da013 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Sivakumar Date: Tue, 14 Jul 2026 23:29:27 +0530 Subject: [PATCH] fix(admin-auth): point forgot-password at the employees endpoint, not users MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/routes/login.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/login.tsx b/src/routes/login.tsx index c931f46..c7f4f8b 100644 --- a/src/routes/login.tsx +++ b/src/routes/login.tsx @@ -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() }),