mirror of
https://github.com/sasjs/server.git
synced 2026-01-03 21:10:05 +00:00
chore: added desktop mode + drive tmp folder fix
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
export const verifyAdmin = (req: any, res: any, next: any) => {
|
||||
const { MODE } = process.env
|
||||
if (MODE === 'desktop') return next()
|
||||
|
||||
const { user } = req
|
||||
if (!user?.isAdmin) return res.status(401).send('Admin account required')
|
||||
next()
|
||||
|
||||
Reference in New Issue
Block a user