Added DB Document for perms, and auth middleware
This commit is contained in:
parent
d0184c5b6b
commit
cde60bb78d
6 changed files with 128 additions and 1 deletions
|
|
@ -19,11 +19,15 @@ const { Router } = require('express');
|
|||
|
||||
|
||||
//local imports
|
||||
const permissionSchema = require("../schemas/permissionSchema");
|
||||
const adminPanelController = require("../controllers/adminPanelController");
|
||||
|
||||
//globals
|
||||
const router = Router();
|
||||
|
||||
//Use authentication middleware
|
||||
router.use(permissionSchema.reqPermCheck("adminPanel"))
|
||||
|
||||
//routing functions
|
||||
router.get('/', adminPanelController.get);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue