mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 05:37:20 +01:00
Consistent error responses. Updated login page.
This commit is contained in:
parent
88f2ac20bc
commit
4c24e54fdd
17 changed files with 170 additions and 159 deletions
|
|
@ -26,7 +26,7 @@ export async function POST(request: Request) {
|
|||
const user = await getUserByUsername(username, { includePassword: true });
|
||||
|
||||
if (!user || !checkPassword(password, user.password)) {
|
||||
return unauthorized();
|
||||
return unauthorized({ code: 'incorrect-username-password' });
|
||||
}
|
||||
|
||||
const { id, role, createdAt } = user;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue