fix: unqi ip and spam keyword

This commit is contained in:
Innei
2021-09-22 14:41:20 +08:00
parent 58415d6eec
commit a86ebf9d9f

View File

@@ -1,9 +1,11 @@
import { ApiProperty } from '@nestjs/swagger'
import { Transform, Type } from 'class-transformer'
import {
ArrayUnique,
IsBoolean,
IsEmail,
IsInt,
IsIP,
IsNotEmpty,
IsOptional,
IsString,
@@ -87,9 +89,11 @@ export class CommentOptionsDto {
@IsString({ each: true })
@IsOptional()
@ArrayUnique()
spamKeywords?: string[]
@IsString({ each: true })
@IsIP(undefined, { each: true })
@ArrayUnique()
@IsOptional()
blockIps?: string[]
@IsOptional()