From aaa249c341f37d88ff11044e9374a83843e682c7 Mon Sep 17 00:00:00 2001 From: laxmanhalaki Date: Wed, 25 Feb 2026 17:57:58 +0530 Subject: [PATCH] activity type route secured --- src/routes/config.routes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/config.routes.ts b/src/routes/config.routes.ts index 741d2d4..33ad28d 100644 --- a/src/routes/config.routes.ts +++ b/src/routes/config.routes.ts @@ -3,6 +3,7 @@ import { getPublicConfig } from '../config/system.config'; import { asyncHandler } from '../middlewares/errorHandler.middleware'; import { activityTypeService } from '../services/activityType.service'; import { generalApiLimiter } from '../middlewares/rateLimiter.middleware'; +import { authenticateToken } from '../middlewares/auth.middleware'; const router = Router(); @@ -31,6 +32,7 @@ router.get('/', * No authentication required - public endpoint */ router.get('/activity-types', + authenticateToken, asyncHandler(async (req: Request, res: Response): Promise => { const activityTypes = await activityTypeService.getAllActivityTypes(true); res.json({ @@ -46,6 +48,4 @@ router.get('/activity-types', return; }) ); - export default router; -