Skip to content

Commit

Permalink
[backend] Fix handler for token verification
Browse files Browse the repository at this point in the history
  • Loading branch information
MananGandhi1810 committed Nov 12, 2024
1 parent d27c5f8 commit e6b04b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/middlewares/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const checkAuth = async (req, res, next, admin = false) => {
});
}
const token = authorization.replace("Bearer ", "");
if (!token) {
if (!token || token == "null") {
return res.status(401).json({
success: false,
message: "Authorization bearer token is missing",
Expand Down

0 comments on commit e6b04b5

Please sign in to comment.