From c00c48c8bd89f336e19ca00b397c77f40e1b4041 Mon Sep 17 00:00:00 2001 From: hailin Date: Sat, 7 Mar 2026 11:50:35 -0800 Subject: [PATCH] fix(notification): accept optional type query param to fix 400 error Backend entity has no type column yet; whitelist the type field in DTO so forbidNonWhitelisted doesn't reject requests from the mobile app. Co-Authored-By: Claude Sonnet 4.6 --- .../src/interface/http/dto/notification-query.dto.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/services/notification-service/src/interface/http/dto/notification-query.dto.ts b/backend/services/notification-service/src/interface/http/dto/notification-query.dto.ts index 8fa79a1..99443a1 100644 --- a/backend/services/notification-service/src/interface/http/dto/notification-query.dto.ts +++ b/backend/services/notification-service/src/interface/http/dto/notification-query.dto.ts @@ -1,4 +1,4 @@ -import { IsOptional, IsInt, Min, Max } from 'class-validator'; +import { IsOptional, IsInt, IsString, Min, Max } from 'class-validator'; import { Type } from 'class-transformer'; import { ApiPropertyOptional } from '@nestjs/swagger'; @@ -17,4 +17,9 @@ export class NotificationQueryDto { @Min(1) @Max(100) limit?: number = 20; + + @ApiPropertyOptional({ description: 'Filter by notification type (e.g. SYSTEM, ACTIVITY)' }) + @IsOptional() + @IsString() + type?: string; }