mafap/server/src/dto/dtos.ts

26 lines
463 B
TypeScript
Raw Normal View History

2023-04-03 23:14:07 -06:00
import { Type } from 'class-transformer';
import { IsNotEmpty, ValidateIf } from 'class-validator';
2023-04-03 13:04:32 -06:00
export class SignedGodTokenDTO {
@IsNotEmpty()
signature: string;
}
export class RetrieveFriendDTO {
2023-04-03 23:14:07 -06:00
@ValidateIf((rfd) => !rfd.name || rfd.id)
2023-04-03 13:04:32 -06:00
name: string;
2023-04-03 23:14:07 -06:00
@ValidateIf((rfd) => !rfd.id || rfd.name)
id: number;
2023-04-03 13:04:32 -06:00
}
export class CreateTimerDTO {
@IsNotEmpty()
name: string;
}
2023-04-03 23:14:07 -06:00
export class RefreshTimerDTO {
@Type(() => Number)
id: number;
}