Commit 4cd6fe8a authored by NGPixel's avatar NGPixel

fix: unauthorized admin should receive 403 code

parent 4f16dd0c
...@@ -47,7 +47,7 @@ router.get(['/a', '/a/*'], (req, res, next) => { ...@@ -47,7 +47,7 @@ router.get(['/a', '/a/*'], (req, res, next) => {
'manage:api' 'manage:api'
])) { ])) {
_.set(res.locals, 'pageMeta.title', 'Unauthorized') _.set(res.locals, 'pageMeta.title', 'Unauthorized')
return res.render('unauthorized', { action: 'view' }) return res.status(403).render('unauthorized', { action: 'view' })
} }
_.set(res.locals, 'pageMeta.title', 'Admin') _.set(res.locals, 'pageMeta.title', 'Admin')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment