Allow negative SMS auto-block threshold in API.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-08 14:55:15 +03:30
co-authored by Cursor
parent 26f7b7e69e
commit b9a33505e4
+1 -2
View File
@@ -20,7 +20,7 @@ export class UpdateSmsAccountDto {
@IsBoolean() @IsBoolean()
isBlocked?: boolean; 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() @IsOptional()
@Transform(({ value }) => { @Transform(({ value }) => {
if (value === null || value === '' || value === undefined) return value === undefined ? undefined : null; if (value === null || value === '' || value === undefined) return value === undefined ? undefined : null;
@@ -29,7 +29,6 @@ export class UpdateSmsAccountDto {
}) })
@ValidateIf((_, v) => v !== null && v !== undefined) @ValidateIf((_, v) => v !== null && v !== undefined)
@IsInt() @IsInt()
@Min(0)
autoBlockBelowRials?: number | null; autoBlockBelowRials?: number | null;
@IsOptional() @IsOptional()