mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
@@ -2,9 +2,12 @@
|
||||
const router = require('express').Router();
|
||||
const controller = require('../../controllers/client/advertisements.controller');
|
||||
|
||||
// ─── GET /api/client/advertisements/active?type=hero ──────────────────────────
|
||||
// ─── GET /api/client/advertisements/active?placement=dashboard.hero ───────────
|
||||
router.get('/active', controller.getActiveAdvertisement);
|
||||
|
||||
// ─── GET /api/client/advertisements/active-batch?placements=a,b,c ─────────────
|
||||
router.get('/active-batch', controller.getActiveAdvertisements);
|
||||
|
||||
// ─── POST /api/client/advertisements/:advertisementId/click ───────────────────
|
||||
router.post('/:advertisementId/click', controller.trackClick);
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@ router.use(authenticate, requireClient());
|
||||
router.get('/profile', profileCtrl.getProfile);
|
||||
router.put('/profile', ...updateProfileValidator, validate, profileCtrl.updateProfile);
|
||||
router.delete('/profile', profileCtrl.deleteAccount);
|
||||
router.patch('/profile/currency', profileCtrl.updateCurrency);
|
||||
router.post('/profile/avatar', handleAvatarUpload, profileCtrl.uploadAvatar);
|
||||
router.delete('/profile/avatar', profileCtrl.deleteAvatar);
|
||||
router.get('/sessions', profileCtrl.getSessions);
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
* 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
|
||||
* 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)
|
||||
*
|
||||
@@ -15,11 +16,12 @@
|
||||
***********************************************************************************************************************************************************************/
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const { list, unseenCount, markSeen, markAllSeen } = require('../../controllers/client/notification.controller');
|
||||
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;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const ctrl = require('../../controllers/client/tiers.controller');
|
||||
const priceCtrl = require('../../controllers/admin/plan_prices.controller');
|
||||
|
||||
// My tier
|
||||
router.get ('/me', ctrl.getMyTier);
|
||||
@@ -28,7 +27,4 @@ router.get ('/categories', ctrl.getCategories);
|
||||
// System badges (public read for profile display)
|
||||
router.get ('/system-badges', ctrl.getSystemBadges);
|
||||
|
||||
// Supported currencies (public — used by currency picker in settings + checkout)
|
||||
router.get ('/currencies', priceCtrl.getCurrencies);
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user