File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // src/constants/creator.constants.ts
2+ // Centralized creator route segments used across modules.
3+
4+ /** Base path for creator collection routes. */
5+ export const BASE = '/creators' ;
6+
7+ /** Root segment for creator module routes. */
8+ export const ROOT = '/' ;
Original file line number Diff line number Diff line change 11// src/modules/creator/creator.routes.ts
22import { Router } from 'express' ;
33import { listCreators } from './creator.controller' ;
4+ import { ROOT as CREATORS_ROOT } from '../../constants/creator.constants' ;
45
56const router = Router ( ) ;
67
@@ -9,6 +10,6 @@ const router = Router();
910 * @desc Get a paginated list of creators
1011 * @access Public
1112 */
12- router . get ( '/' , listCreators ) ;
13+ router . get ( CREATORS_ROOT , listCreators ) ;
1314
1415export default router ;
Original file line number Diff line number Diff line change @@ -3,12 +3,13 @@ import authRouter from './auth/auth.routes';
33import healthRouter from './health/health.routes' ;
44import configRouter from './config/config.routes' ;
55import creatorRouter from './creator/creator.routes' ;
6+ import { BASE as CREATORS_BASE } from '../constants/creator.constants' ;
67
78const router = Router ( ) ;
89
910router . use ( '/health' , healthRouter ) ;
1011router . use ( '/auth' , authRouter ) ;
1112router . use ( '/config' , configRouter ) ;
12- router . use ( '/creators' , creatorRouter ) ;
13+ router . use ( CREATORS_BASE , creatorRouter ) ;
1314
1415export default router ;
You can’t perform that action at this time.
0 commit comments