Channel Rank/Auth base backend functional

This commit is contained in:
rainbow napkin 2024-11-25 00:44:07 -05:00
parent 057537341a
commit 61fab57a6d
12 changed files with 318 additions and 83 deletions

View file

@ -19,7 +19,7 @@ const { Router } = require('express');
//local imports
const permissionSchema = require("../schemas/permissionSchema");
const channelModel = require("../schemas/channel/channelSchema");
const channelController = require("../controllers/channelController");
const channelSettingsController = require("../controllers/channelSettingsController");
@ -27,7 +27,7 @@ const channelSettingsController = require("../controllers/channelSettingsControl
const router = Router();
//User authentication middleware
router.use("/*/settings",permissionSchema.reqPermCheck("manageChannel"));
router.use("/*/settings",channelModel.reqPermCheck("manageChannel","/c/"));
//routing functions
router.get('/*/settings', channelSettingsController.get);