Updated admin and mod flag system
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user