diff --git a/backend/src/album/album.module.ts b/backend/src/album/album.module.ts index 16c520e..a45e795 100644 --- a/backend/src/album/album.module.ts +++ b/backend/src/album/album.module.ts @@ -7,7 +7,17 @@ import { AlbumService } from './album.service'; @Module({ imports: [TypeOrmModule.forFeature([Album])], controllers: [AlbumController], - providers: [AlbumService], + providers: [ + AlbumService, + { + provide: APP_PIPE, + useValue: new ValidationPipe({ + whitelist: true, + forbidNonWhitelisted: true, + transform: true, + }), + }, + ], exports: [TypeOrmModule] }) export class AlbumModule {} diff --git a/backend/src/song/song.module.ts b/backend/src/song/song.module.ts index e61e288..4f03488 100644 --- a/backend/src/song/song.module.ts +++ b/backend/src/song/song.module.ts @@ -11,7 +11,17 @@ import { SongService } from './song.service'; AlbumModule ], controllers: [SongController], - providers: [SongService], + providers: [ + SongService, + { + provide: APP_PIPE, + useValue: new ValidationPipe({ + whitelist: true, + forbidNonWhitelisted: true, + transform: true, + }), + }, + ], exports: [TypeOrmModule] }) export class SongModule {}