Skip to content

Commit 42e6357

Browse files
committed
Bug Login failer action
1 parent a94d3a3 commit 42e6357

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

backend/app/controller/common/controllerCommon.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ class controllerCommon {
4242

4343
authError(res) {
4444
return (error) => {
45-
res.status(404); // authUser Not found
45+
console.log(error)
46+
res.status(401); // authUser Not found
4647
res.json(error);
4748
}
4849
}

frontend/src/services/userService/userService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function handleResponse(response) {
5858
return response.text().then(text => {
5959
const data = text && JSON.parse(text);
6060
if (!response.ok) {
61-
if (response.status === 401) {
61+
if (response.status === 21) {
6262
// auto logout if 401 response returned from api
6363
logout();
6464
Location.reload(true);

0 commit comments

Comments
 (0)