Add admin middleware for StatsController

This commit is contained in:
advplyr 2025-03-29 17:37:13 -05:00
parent 4fb5330308
commit 73c1ea92f3
2 changed files with 3 additions and 3 deletions

View file

@ -65,7 +65,7 @@ class StatsController {
*/
async middleware(req, res, next) {
if (!req.user.isAdminOrUp) {
Logger.error(`[StatsController] Non-root user "${req.user.username}" attempted to access stats route`)
Logger.error(`[StatsController] Non-admin user "${req.user.username}" attempted to access stats route`)
return res.sendStatus(403)
}