작성
·
235
1
@UsePipes(
new ValidationPipe({
transform: true,
transformOptions: {
enableImplicitConversion: true,
},
whitelist: true,
forbidNonWhitelisted: true,
}),
)
@UseFilters(SocketCatchHttpExceptionFilter)
@WebSocketGateway({
// ws://localhost:3000/chats
namespace: 'chats',
})
export class ChatsGateway implements OnGatewayConnection {
constructor(
private readonly chatsService: ChatsService,
private readonly messagesService: ChatsMessagesService,
) {}
...
}
각각의 메소드마다 넣어주는것보다 나은것 같아서 공유 해보아요!