Skip to content

Commit fea8879

Browse files
committed
chore: add Heroku changes
1 parent 87cc03d commit fea8879

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

middlewares/auth/checkIsAdmin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const isAdmin = async (req, res, next) => {
88
const user = await User.findOne({ email: req?.user.email });
99
const adminUser = user && user.role === ADMIN_ROLE && ADMIN_EMAIL.includes(`${req?.user.email}`);
1010
if (!adminUser) {
11-
return res.status(403).send(Response({}, false, true, 'Auth Failed (Unauthorized)', 403));
11+
return res.status(403).send(Response({}, false, true, 'Auth Failed (Unauthorized)!!', 403));
1212
}
1313
next();
1414
} catch (error) {

middlewares/auth/checkIsAuth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
const decodedToken = jwt.verify(token, TOKEN_SECRET, (err, user) => {
2525
// HTTP Status 403 mean Forbidden
2626
if (err) {
27-
return res.status(403).send(Response({}, false, true, 'Auth Failed (Unauthorized)', 403));
27+
return res.status(403).send(Response({}, false, true, 'Auth Failed (Unauthorized)!', 403));
2828
}
2929

3030
// console.log('The Authorized User is ', user);
256 KB
Loading

0 commit comments

Comments
 (0)