diff --git a/backend/services/admin-service/src/main.ts b/backend/services/admin-service/src/main.ts index c3fa02dc..7469966e 100644 --- a/backend/services/admin-service/src/main.ts +++ b/backend/services/admin-service/src/main.ts @@ -1,5 +1,5 @@ import { NestFactory } from '@nestjs/core' -import { ValidationPipe, Logger } from '@nestjs/common' +import { ValidationPipe, Logger, RequestMethod } from '@nestjs/common' import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger' import { AppModule } from './app.module' @@ -7,8 +7,13 @@ async function bootstrap() { const logger = new Logger('Bootstrap') const app = await NestFactory.create(AppModule) - // Global prefix - app.setGlobalPrefix('api/v1') + // Global prefix (exclude mobile API routes that need custom paths) + app.setGlobalPrefix('api/v1', { + exclude: [ + { path: 'api/app/version/(.*)', method: RequestMethod.ALL }, + { path: 'api/app/version/check', method: RequestMethod.GET }, + ], + }) // Validation app.useGlobalPipes(