Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(stats): declare the 400 for an invalid message stats query

Yudhi Armyndharis7c22e390b91d
diff --git a/src/modules/stats/stats.controller.ts b/src/modules/stats/stats.controller.ts
index 466af5d57..238c1575a 100644
--- a/src/modules/stats/stats.controller.ts
+++ b/src/modules/stats/stats.controller.ts
@@ -36,6 +36,10 @@ export class StatsController {
description: 'Message statistics with a time series for the requested period.',
type: MessageStatsResponseDto,
})
+ @ApiResponse({
+ status: 400,
+ description: 'A query value is invalid, or the query carries a field the DTO does not declare.',
+ })
async getMessageStats(@Query() query: StatsQueryDto) {
return this.statsService.getMessageStats(query.period || '24h');
}