Skip to content

Commit

Permalink
[TM-1312] Include UUID on the user DTO.
Browse files Browse the repository at this point in the history
  • Loading branch information
roguenet committed Sep 27, 2024
1 parent 847c09c commit 6fa2180
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 4 additions & 3 deletions libs/common/src/lib/dto/user.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class UserFramework {
export class UserDto extends JsonApiAttributes<UserDto> {
constructor(user: User, primaryRole: string, frameworks: { name: string, slug: string }[]) {
super({
uuid: user.uuid,
firstName: user.firstName,
lastName: user.lastName,
fullName:
Expand All @@ -29,6 +30,9 @@ export class UserDto extends JsonApiAttributes<UserDto> {
})
}

@ApiProperty()
uuid: string;

@ApiProperty()
firstName: string | null;

Expand All @@ -53,6 +57,3 @@ export class UserDto extends JsonApiAttributes<UserDto> {
@ApiProperty({ type: () => UserFramework, isArray: true })
frameworks: UserFramework[]
}

// organisation: side load, can be null
// usersStatus (?)
4 changes: 1 addition & 3 deletions libs/common/src/lib/util/json-api-builder.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import {
DTO_TYPE_METADATA
} from '@terramatch-microservices/common/decorators/json-api-dto.decorator';
import { DTO_TYPE_METADATA } from '../decorators/json-api-dto.decorator';
import { InternalServerErrorException } from '@nestjs/common';

type AttributeValue = string | number | boolean;
Expand Down

0 comments on commit 6fa2180

Please sign in to comment.