Mods can now add and edit the news feed
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
|
//use middleware to authenticate the rest of the routes
|
||||||
router.use(authToken);
|
router.use(authToken);
|
||||||
router.use((req, res, next) => {
|
router.use((req, res, next) => {
|
||||||
if (req.user.admin) {
|
if (req.user.mod) {
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
res.status(403).end();
|
res.status(403).end();
|
||||||
|
|||||||
Reference in New Issue
Block a user