From 7e51da56f64cd1b6b86347db61e4079002387f98 Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Fri, 31 May 2024 21:52:01 +0100 Subject: [PATCH] refactor: Update TeamPermissionService to include projectId in select props This code change updates the TeamPermissionService to include the "projectId" property in the select props when querying for team members. This ensures that the "projectId" value is retrieved along with the "userId" value, allowing for easier access to the project ID in subsequent code logic. Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made. --- CommonServer/Services/TeamPermissionService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CommonServer/Services/TeamPermissionService.ts b/CommonServer/Services/TeamPermissionService.ts index f22ce9aa0f..3f15d91ed1 100644 --- a/CommonServer/Services/TeamPermissionService.ts +++ b/CommonServer/Services/TeamPermissionService.ts @@ -129,6 +129,7 @@ export class Service extends DatabaseService { }, select: { userId: true, + projectId: true, }, props: { isRoot: true, @@ -144,7 +145,7 @@ export class Service extends DatabaseService { ); await AccessTokenService.refreshUserTenantAccessPermission( member.userId!, - permission.data.projectId! + permission.projectId! ); } }