From b9a33505e429eeeb9ef707c21087bd45fa1c840f Mon Sep 17 00:00:00 2001 From: Mahdi Date: Sat, 8 Aug 2026 14:55:15 +0330 Subject: [PATCH] Allow negative SMS auto-block threshold in API. Co-authored-by: Cursor --- src/sms/dto/sms-account.dto.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sms/dto/sms-account.dto.ts b/src/sms/dto/sms-account.dto.ts index 33bdefa..3a4dcbb 100644 --- a/src/sms/dto/sms-account.dto.ts +++ b/src/sms/dto/sms-account.dto.ts @@ -20,7 +20,7 @@ export class UpdateSmsAccountDto { @IsBoolean() isBlocked?: boolean; - /** Null clears auto-block; omit leaves unchanged. UI sends tomans×10 as rials. */ + /** Null clears auto-block; omit leaves unchanged. May be negative (credit limit). UI sends tomans×10 as rials. */ @IsOptional() @Transform(({ value }) => { if (value === null || value === '' || value === undefined) return value === undefined ? undefined : null; @@ -29,7 +29,6 @@ export class UpdateSmsAccountDto { }) @ValidateIf((_, v) => v !== null && v !== undefined) @IsInt() - @Min(0) autoBlockBelowRials?: number | null; @IsOptional()