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 <noreply@anthropic.com>
This commit is contained in:
parent
af7fdfd428
commit
c00c48c8bd
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue