mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 06:57:12 +01:00
make isAdminSession usable by api routes
This commit is contained in:
@@ -4,6 +4,7 @@ import withSession, { isAdminSession } from '../../../../../lib/session'
|
||||
|
||||
export default withSession(async function billHandler(req, res) {
|
||||
if (!isAdminSession(req, res)) {
|
||||
res.status(403).send({ message: 'Not Authorized' })
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user