Fixed payload check
Build and Push Docker Images / detect-changes (push) Successful in 10s
Build and Push Docker Images / build-auth-api (push) Successful in 58s
Build and Push Docker Images / build-employee-api (push) Successful in 58s
Build and Push Docker Images / build-transit-api (push) Successful in 58s
Build and Push Docker Images / build-error-log-api (push) Successful in 1m9s
Build and Push Docker Images / build-admin-ui (push) Successful in 1m15s
Build and Push Docker Images / build-monitoring-ui (push) Successful in 1m12s
Build and Push Docker Images / deploy-test-node (push) Successful in 3s
Build and Push Docker Images / detect-changes (push) Successful in 10s
Build and Push Docker Images / build-auth-api (push) Successful in 58s
Build and Push Docker Images / build-employee-api (push) Successful in 58s
Build and Push Docker Images / build-transit-api (push) Successful in 58s
Build and Push Docker Images / build-error-log-api (push) Successful in 1m9s
Build and Push Docker Images / build-admin-ui (push) Successful in 1m15s
Build and Push Docker Images / build-monitoring-ui (push) Successful in 1m12s
Build and Push Docker Images / deploy-test-node (push) Successful in 3s
This commit is contained in:
@@ -58,7 +58,7 @@ function verifyAdmin(req, res, next) {
|
||||
|
||||
try {
|
||||
const payload = jwt.verify(auth.slice(7), JWT_SECRET);
|
||||
if (!payload?.isAdmin) {
|
||||
if (!payload?.user.isAdmin) {
|
||||
return res.status(403).json({ error: toFriendlyError(403) });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user