mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2025-12-28 05:09:23 +00:00
add /auth/patch endpoint
This commit is contained in:
15
src/modules/auth/dto/update-user-data.dto.ts
Normal file
15
src/modules/auth/dto/update-user-data.dto.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user