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 newChannelController = require("../controllers/newChannelController");
|
||||
|
||||
//globals
|
||||
const router = Router();
|
||||
|
||||
//user authentication middleware
|
||||
router.use("/",permissionSchema.reqPermCheck("registerChannel"));
|
||||
|
||||
//routing functions
|
||||
router.get('/', newChannelController.get);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue