From 454bda4c82035cf7b649afc966a0a9f596ca2817 Mon Sep 17 00:00:00 2001 From: devlikepro Date: Thu, 31 Oct 2024 13:07:30 +0700 Subject: [PATCH] [core] fix /api/messages fix #620 --- src/api/chatting.controller.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/chatting.controller.ts b/src/api/chatting.controller.ts index 96fe276a..c3b4f7c9 100644 --- a/src/api/chatting.controller.ts +++ b/src/api/chatting.controller.ts @@ -6,6 +6,7 @@ import { Put, Query, UsePipes, + ValidationPipe, } from '@nestjs/common'; import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger'; import { WAHAValidationPipe } from '@waha/nestjs/pipes/WAHAValidationPipe'; @@ -172,6 +173,7 @@ export class ChattingController { @Get('/messages') @ApiOperation({ summary: 'Get messages in a chat' }) + @UsePipes(new ValidationPipe({ transform: true, whitelist: true })) async getMessages( @Query() query: GetMessageQuery, @Query() filter: GetChatMessagesFilter,