From 9349c6e60e19346d8a71db460b1787f72ffe4db7 Mon Sep 17 00:00:00 2001 From: Moritz Hannemann Date: Mon, 15 Jan 2024 16:02:44 +0100 Subject: [PATCH] Make `emailVerified` and `realm` optional in ReturnedUserDto #998 --- src/users/dto/returned-user.dto.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/users/dto/returned-user.dto.ts b/src/users/dto/returned-user.dto.ts index 646c4bb95..471d57a6b 100644 --- a/src/users/dto/returned-user.dto.ts +++ b/src/users/dto/returned-user.dto.ts @@ -1,4 +1,5 @@ import { ApiProperty } from "@nestjs/swagger"; +import { IsOptional } from "class-validator"; export class ReturnedUserDto { @ApiProperty({ @@ -18,13 +19,17 @@ export class ReturnedUserDto { @ApiProperty({ description: "Email has been verified", + required: false, }) - readonly emailVerified: boolean; + @IsOptional() + readonly emailVerified?: boolean; @ApiProperty({ description: "Where the info of this user are stored", + required: false, }) - readonly realm: string; + @IsOptional() + readonly realm?: string; @ApiProperty({ description: "Strategy used to authenticate this user",