Re_Backend/src/routes/userPreference.routes.ts
2025-12-03 19:59:44 +05:30

29 lines
786 B
TypeScript

import { Router } from 'express';
import { authenticateToken } from '@middlewares/auth.middleware';
import {
getNotificationPreferences,
updateNotificationPreferences
} from '@controllers/userPreference.controller';
const router = Router();
// All routes require authentication
router.use(authenticateToken);
/**
* @route GET /api/v1/user/preferences/notifications
* @desc Get current user's notification preferences
* @access Private (Authenticated users)
*/
router.get('/notifications', getNotificationPreferences);
/**
* @route PUT /api/v1/user/preferences/notifications
* @desc Update current user's notification preferences
* @access Private (Authenticated users)
*/
router.put('/notifications', updateNotificationPreferences);
export default router;