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