Fix admin check on monitoring UI
Build and Push Docker Images / detect-changes (push) Successful in 12s
Build and Push Docker Images / build-auth-api (push) Has been skipped
Build and Push Docker Images / build-employee-api (push) Has been skipped
Build and Push Docker Images / build-transit-api (push) Has been skipped
Build and Push Docker Images / build-error-log-api (push) Has been skipped
Build and Push Docker Images / build-admin-ui (push) Has been skipped
Build and Push Docker Images / build-monitoring-ui (push) Successful in 1m15s
Build and Push Docker Images / deploy-test-node (push) Successful in 3s

This commit is contained in:
Sven laptop
2026-09-23 17:12:41 +02:00
parent 1c055d84e8
commit 48c710bfbf
2 changed files with 59 additions and 37 deletions
+1 -1
View File
@@ -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) });
}