From 329d8b5507720768a91f39554b8f37c34c01d956 Mon Sep 17 00:00:00 2001 From: Claus-Peter Huebner Date: Thu, 6 Jul 2023 03:13:10 +0200 Subject: [PATCH] add Field role --- backend/src/graphql/model/AdminUser.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/src/graphql/model/AdminUser.ts b/backend/src/graphql/model/AdminUser.ts index 92a22b7f1..b3f82d76d 100644 --- a/backend/src/graphql/model/AdminUser.ts +++ b/backend/src/graphql/model/AdminUser.ts @@ -6,6 +6,7 @@ export class AdminUser { constructor(user: User) { this.firstName = user.firstName this.lastName = user.lastName + this.role = user.userRoles ? user.userRoles[0].role : '' } @Field(() => String) @@ -13,6 +14,9 @@ export class AdminUser { @Field(() => String) lastName: string + + @Field(() => String) + role: string } @ObjectType()