module.exports = app => { const studyMaterial = require("../controllers/studyMaterial.controller.js"); var router = require("express").Router(); router.get("/:id", studyMaterial.studyMaterialGetById); router.delete("/:id", studyMaterial.deleteStudyMaterial); router.put("/:id", studyMaterial.updateStudyMaterial); router.post("/all", studyMaterial.getAllStudyMaterial); router.post("/add", studyMaterial.addStudyMaterial); router.post("/materia-assigned", studyMaterial.getMaterialAssigned); app.use('/studyMaterial', router); };