mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
@@ -5,8 +5,10 @@ const ctrl = require('../../controllers/admin/notification_templates.controlle
|
||||
|
||||
// Auth + requireAdmin applied by admin.routes.js
|
||||
|
||||
router.get('/', ctrl.getNotificationTemplates);
|
||||
router.get('/:id', ctrl.getNotificationTemplate);
|
||||
router.put('/:id', ctrl.updateNotificationTemplate);
|
||||
router.get ('/', ctrl.getNotificationTemplates);
|
||||
router.post ('/', ctrl.createNotificationTemplate);
|
||||
router.get ('/:id', ctrl.getNotificationTemplate);
|
||||
router.put ('/:id', ctrl.updateNotificationTemplate);
|
||||
router.delete('/:id', ctrl.deleteNotificationTemplate);
|
||||
|
||||
module.exports = router;
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
***********************************************************************************************************************************************************************/
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const { list, unseenCount, markSeen, markAllSeen } = require('../../controllers/admin/notification.controller');
|
||||
const { list, unseenCount, stickyAnnouncement, markSeen, markAllSeen } = require('../../controllers/admin/notification.controller');
|
||||
|
||||
router.get('/', list);
|
||||
router.get('/unseen', unseenCount);
|
||||
router.get('/sticky', stickyAnnouncement);
|
||||
router.patch('/seen-all', markAllSeen);
|
||||
router.patch('/:id/seen', markSeen);
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ const questionCtrl = require("../../controllers/admin/courses.controller"); // s
|
||||
// ── static segments first ─────────────────────────────────────────────────────
|
||||
router.get("/", ctrl.getUnits);
|
||||
router.post("/", ctrl.createUnit);
|
||||
router.post("/full", ctrl.createUnitFull);
|
||||
router.get("/flat", ctrl.getUnitsFlat);
|
||||
router.get("/field-values", ctrl.getUnitFieldValues);
|
||||
router.delete("/bulk", ctrl.bulkArchiveUnits);
|
||||
|
||||
Reference in New Issue
Block a user