Allow negative SMS auto-block threshold in API.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user