mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2025-12-25 05:09:25 +00:00
fix: make avatar and name in update me request optional
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
import { PickType } from '@nestjs/swagger'
|
||||
import { IsEmail, IsOptional } from 'class-validator'
|
||||
import { ApiProperty, PickType } from '@nestjs/swagger'
|
||||
import { IsOptional } from 'class-validator'
|
||||
|
||||
import { User } from '../entities/auth.entity'
|
||||
|
||||
export class UpdateUserDataDto extends PickType(User, ['name', 'email', 'avatar'] as const) {
|
||||
export class UpdateUserDataDto extends PickType(User, ['name', 'avatar'] as const) {
|
||||
@IsOptional()
|
||||
@ApiProperty({ required: false })
|
||||
avatar: string
|
||||
|
||||
@IsOptional()
|
||||
@ApiProperty({ required: false })
|
||||
name: string
|
||||
|
||||
@IsOptional()
|
||||
@IsEmail()
|
||||
email: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user