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