Skip to content

Commit

Permalink
wip: loadUser
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham-Lal committed Nov 18, 2023
1 parent 814eb18 commit a37363c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions api/controllers/authController.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ exports.loadUser = async (req, res) => {
});
}
catch (error) {
console.log(error);
res.status(500).json({
success: false,
msg: "Something went wrong... Try again later!"
Expand Down
4 changes: 2 additions & 2 deletions client/src/store/useAuthStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,14 @@ export const useLoginStore = create(() => ({
}

if (result.success === false) {
localStorage.removeItem("login_token");
// localStorage.removeItem("login_token");
useAuthStore.getState().setVerifyLoading(false);
useAuthStore.getState().setVerifySuccess(false);
}
})
}
catch (error) {
localStorage.removeItem("login_token");
// localStorage.removeItem("login_token");
useAuthStore.getState().setVerifyLoading(false);
useAuthStore.getState().setVerifySuccess(false);
}
Expand Down

0 comments on commit a37363c

Please sign in to comment.