diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c969c176..be4fb1f68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Added API versioning - Added more durations in the coupon system ### Changed diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index 5a077910e..cf565a36d 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -1,4 +1,4 @@ -import { Logger, ValidationPipe } from '@nestjs/common'; +import { Logger, ValidationPipe, VersioningType } from '@nestjs/common'; import { NestFactory } from '@nestjs/core'; import { AppModule } from './app/app.module'; @@ -7,8 +7,11 @@ import { environment } from './environments/environment'; async function bootstrap() { const app = await NestFactory.create(AppModule); app.enableCors(); - const globalPrefix = 'api'; - app.setGlobalPrefix(globalPrefix); + app.enableVersioning({ + defaultVersion: '1', + type: VersioningType.URI + }); + app.setGlobalPrefix('api'); app.useGlobalPipes( new ValidationPipe({ forbidNonWhitelisted: true, diff --git a/apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html b/apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html index 614c28bfe..2186368ca 100644 --- a/apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html +++ b/apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html @@ -8,7 +8,7 @@