mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2025-12-17 05:09:26 +00:00
16 lines
337 B
TypeScript
16 lines
337 B
TypeScript
import { PickType } from '@nestjs/swagger'
|
|
import { IsEmail, IsOptional } from 'class-validator'
|
|
|
|
import { User } from '../entities/auth.entity'
|
|
|
|
export class UpdateUserDataDto extends PickType(User, ['name', 'email', 'avatar'] as const) {
|
|
avatar: string
|
|
|
|
@IsOptional()
|
|
name: string
|
|
|
|
@IsOptional()
|
|
@IsEmail()
|
|
email: string
|
|
}
|