Added DB Document for perms, and auth middleware

This commit is contained in:
rainbownapkin 2024-11-17 07:45:58 -05:00
parent d0184c5b6b
commit cde60bb78d
6 changed files with 128 additions and 1 deletions

View file

@ -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);