Skip to content
Snippets Groups Projects
Commit df139b85 authored by SuperChrisBoy's avatar SuperChrisBoy
Browse files

Merge branch 'main' into chris

parents 888e17c9 2d459c9f
No related branches found
No related tags found
No related merge requests found
...@@ -71,7 +71,7 @@ async function login(user, pass) { ...@@ -71,7 +71,7 @@ async function login(user, pass) {
if (!row) if (!row)
return {"code": 404, "error": "Username does not exist"}; return {"code": 404, "error": "Username does not exist"};
try { try {
if (await argon2.verify(row['pwhash'], pass)) if (!await argon2.verify(row['pwhash'], pass))
return {"code": 400, "error": "Username/password combination is incorrect"}; return {"code": 400, "error": "Username/password combination is incorrect"};
return {"code": 200, "token": makeToken(user)}; return {"code": 200, "token": makeToken(user)};
} catch (e) { } catch (e) {
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment