mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
26 lines
1.2 KiB
JavaScript
26 lines
1.2 KiB
JavaScript
/***********************************************************************************************************************************************************************
|
|
* File Name : notifications.routes.js
|
|
* Type : Router (Admin)
|
|
* Description : Admin notification endpoints.
|
|
*
|
|
* GET /api/admin/notifications — paginated list
|
|
* GET /api/admin/notifications/unseen — unseen count
|
|
* PATCH /api/admin/notifications/seen-all — mark all seen
|
|
* PATCH /api/admin/notifications/:id/seen — mark one seen
|
|
*
|
|
* Guards: inherited from admin.routes.js (authenticate → requireAdmin → adminLimiter)
|
|
*
|
|
* Author: Kenneth Obsequio (@lash0000)
|
|
* Date Created: Jun. 19, 2026
|
|
***********************************************************************************************************************************************************************/
|
|
const express = require('express');
|
|
const router = express.Router();
|
|
const { list, unseenCount, markSeen, markAllSeen } = require('../../controllers/admin/notification.controller');
|
|
|
|
router.get('/', list);
|
|
router.get('/unseen', unseenCount);
|
|
router.patch('/seen-all', markAllSeen);
|
|
router.patch('/:id/seen', markSeen);
|
|
|
|
module.exports = router;
|