Fix admin login URL — use /api/gateway/auth/login proxy route
Was calling /api/admin/auth/login which had no handler. Fixed to /api/gateway/auth/login which proxies to Rust backend. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8345d6574c
commit
02df2baa4e
1 changed files with 1 additions and 1 deletions
|
|
@ -76,7 +76,7 @@ export default function LoginPage() {
|
|||
const body = JSON.stringify({ email: email().trim().toLowerCase(), password: password(), loginTarget: 'admin' });
|
||||
const headers = { 'Content-Type': 'application/json', Accept: 'application/json', 'x-portal-target': 'admin' };
|
||||
let payload: any = {}; let status = 500; let success = false;
|
||||
const r = await fetch('/api/admin/auth/login', { method: 'POST', headers, credentials: 'include', body });
|
||||
const r = await fetch('/api/gateway/auth/login', { method: 'POST', headers, credentials: 'include', body });
|
||||
status = r.status; payload = await r.json().catch(() => ({}));
|
||||
if (r.ok) { success = true; }
|
||||
if (!success) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue