1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-05 05:40:06 +00:00

chore(merge): Merge branch 'master' into authentication-with-jwt

This commit is contained in:
Saad Jutt
2021-11-09 18:24:35 +05:00
83 changed files with 43080 additions and 10960 deletions

View File

@@ -0,0 +1,5 @@
export const verifyAdmin = (req: any, res: any, next: any) => {
const { user } = req
if (!user?.isAdmin) return res.status(401).send('Admin account required')
next()
}