mirror of
https://github.com/CaramelFur/Picsur.git
synced 2025-11-14 15:45:49 +01:00
clean up validation, still not happy
This commit is contained in:
@@ -1,20 +1,18 @@
|
||||
import { IsDefined, IsNotEmpty, IsString } from 'class-validator';
|
||||
import { EntityIDOptional } from '../validators/entity-id.validator';
|
||||
import { IsOptional, IsString } from 'class-validator';
|
||||
import { IsEntityID } from '../validators/entity-id.validator';
|
||||
import { IsPosInt } from '../validators/positive-int.validator';
|
||||
|
||||
export class EUsrPreference {
|
||||
@EntityIDOptional()
|
||||
@IsOptional()
|
||||
@IsEntityID()
|
||||
id?: string;
|
||||
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
key: string;
|
||||
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
value: string;
|
||||
|
||||
@IsDefined()
|
||||
@IsPosInt()
|
||||
userId: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user