diff --git a/src/core/auth/auth.ts b/src/core/auth/auth.ts index 03aa5f7b..6d995ae4 100644 --- a/src/core/auth/auth.ts +++ b/src/core/auth/auth.ts @@ -176,7 +176,7 @@ export const useAuthStore = defineStore('admin-auth', () => { try { const response = await http.post, ApiEnvelope>( '/auth/login', - { username: account, password }, + { loginId: account, password }, ) const result = unwrapApiResponse(response) await applySession(result, expectedGeneration) diff --git a/src/shared/api/http.test.ts b/src/shared/api/http.test.ts index 871ac892..15b361fb 100644 --- a/src/shared/api/http.test.ts +++ b/src/shared/api/http.test.ts @@ -32,7 +32,7 @@ describe('API error diagnostics', () => { } } - await http.post('/auth/login', { username: 'operator', password: 'secret' }) + await http.post('/auth/login', { loginId: 'operator', password: 'secret' }) expect(authorization).toBeUndefined() localStorage.removeItem('cc-admin-token')