mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-25 10:19:04 +02:00
Add admin middleware for StatsController
This commit is contained in:
parent
4fb5330308
commit
73c1ea92f3
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue