Updated admin and mod flag system

This commit is contained in:
2021-03-24 08:22:18 +11:00
parent c72c933c0b
commit 1c32e42b47
+1 -1
View File
@@ -23,7 +23,7 @@ router.get('/archive/metadata/:id(\\d+)', query(true, true));
//use middleware to authenticate the rest of the routes
router.use(authToken);
router.use((req, res, next) => {
if (req.user.privilege == 'administrator') {
if (req.user.admin) {
next();
} else {
res.status(403).end();