From 2915dde73df0f436b0643b248b8c7dcc62f00681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Wed, 20 Sep 2023 08:33:57 +0100 Subject: [PATCH] chore: Add team slug and name to `GetByEmail` request (#133) See comment here for context - https://github.com/theopensystemslab/planx-new/pull/2224#discussion_r1330510998 --- src/requests/user.ts | 6 +++++- src/types/user.ts | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/requests/user.ts b/src/requests/user.ts index eba2dd45..f5f54892 100644 --- a/src/requests/user.ts +++ b/src/requests/user.ts @@ -120,8 +120,12 @@ async function getByEmail( email isPlatformAdmin: is_platform_admin teams { - teamId: team_id role + team { + name + slug + id + } } } } diff --git a/src/types/user.ts b/src/types/user.ts index bfe3c968..39e77930 100644 --- a/src/types/user.ts +++ b/src/types/user.ts @@ -10,6 +10,10 @@ export interface User { } export interface UserTeams { - teamId: number; role: TeamRole; + team: { + name: string; + slug: string; + id: number; + }; }