fix: user id and totpVerified can't be changed by user
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { OmitType, PartialType } from "@nestjs/swagger";
|
import { PartialType, PickType } from "@nestjs/swagger";
|
||||||
import { UserDTO } from "./user.dto";
|
import { UserDTO } from "./user.dto";
|
||||||
|
|
||||||
export class UpdateOwnUserDTO extends PartialType(
|
export class UpdateOwnUserDTO extends PartialType(
|
||||||
OmitType(UserDTO, ["isAdmin", "password"] as const),
|
PickType(UserDTO, ["username", "email"] as const)
|
||||||
) {}
|
) {}
|
||||||
|
|||||||
Reference in New Issue
Block a user