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,12 +19,16 @@ const { Router } = require('express');
|
|||
|
||||
|
||||
//local imports
|
||||
const permissionSchema = require("../schemas/permissionSchema");
|
||||
const channelController = require("../controllers/channelController");
|
||||
const channelSettingsController = require("../controllers/channelSettingsController");
|
||||
|
||||
//globals
|
||||
const router = Router();
|
||||
|
||||
//User authentication middleware
|
||||
router.use("/*/settings",permissionSchema.reqPermCheck("manageChannel"));
|
||||
|
||||
//routing functions
|
||||
router.get('/*/settings', channelSettingsController.get);
|
||||
router.get('/*/', channelController.get);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue