mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
* fix(server): user update * update dto * generate api * improve validation * add e2e tests for updating user --------- Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com>
18 lines
455 B
TypeScript
18 lines
455 B
TypeScript
import { IsBoolean, IsNotEmpty, IsOptional, IsUUID } from 'class-validator';
|
|
import { CreateUserDto } from './create-user.dto';
|
|
import { ApiProperty, PartialType } from '@nestjs/swagger';
|
|
|
|
export class UpdateUserDto extends PartialType(CreateUserDto) {
|
|
@IsNotEmpty()
|
|
@IsUUID('4')
|
|
@ApiProperty({ format: 'uuid' })
|
|
id!: string;
|
|
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
isAdmin?: boolean;
|
|
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
shouldChangePassword?: boolean;
|
|
}
|