fixed type of value and valid_for in AdminPostDiscountsDiscountReq (#1128)
* fixed type of value in update/rule * update type of valid_for
This commit is contained in:
1 parent
6b34a9adab
commit
a6f352d9f1
1 file changed
+3
-3
@@ -13,8 +13,8 @@ import {
|
|||||||
} from "class-validator"
|
} from "class-validator"
|
||||||
import { defaultAdminDiscountsFields, defaultAdminDiscountsRelations } from "."
|
import { defaultAdminDiscountsFields, defaultAdminDiscountsRelations } from "."
|
||||||
import DiscountService from "../../../../services/discount"
|
import DiscountService from "../../../../services/discount"
|
||||||
import { IsGreaterThan } from "../../../../utils/validators/greater-than"
|
|
||||||
import { validator } from "../../../../utils/validator"
|
import { validator } from "../../../../utils/validator"
|
||||||
|
import { IsGreaterThan } from "../../../../utils/validators/greater-than"
|
||||||
import { IsISO8601Duration } from "../../../../utils/validators/iso8601-duration"
|
import { IsISO8601Duration } from "../../../../utils/validators/iso8601-duration"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -145,7 +145,7 @@ export class AdminUpdateDiscountRule {
|
|||||||
type: string
|
type: string
|
||||||
|
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
value: string
|
value: number
|
||||||
|
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
@@ -154,5 +154,5 @@ export class AdminUpdateDiscountRule {
|
|||||||
@IsArray()
|
@IsArray()
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsString({ each: true })
|
@IsString({ each: true })
|
||||||
valid_for?: string
|
valid_for?: string[]
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user