Skip to content

Commit

Permalink
fix bug in get_user function frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
Lopkop committed Apr 2, 2024
1 parent 0566d13 commit 80c5004
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function get_user() {
});
const user = await response.json();

if (response.status === 400 || user.message === "Incorrect username or password" || user.message === "Token was not provided") {
if (response.status == 401 || response.status === 400 || user.message === "Incorrect username or password" || user.message === "Token was not provided") {
return false;
}
return user;
Expand Down

0 comments on commit 80c5004

Please sign in to comment.