From 0f0e2b360cef29f0bbdeb4f9c6de48cafaa77a21 Mon Sep 17 00:00:00 2001 From: Akhil Mohan Date: Tue, 12 Mar 2024 21:57:45 +0530 Subject: [PATCH] feat(server): rebased migration files and resolved commits --- ...40308154949_temp-roles.ts => 20240312162549_temp-roles.ts} | 0 ...-role-identity.ts => 20240312162556_temp-role-identity.ts} | 0 .../src/services/project-membership/project-membership-dal.ts | 4 ++-- frontend/src/hooks/api/users/types.ts | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) rename backend/src/db/migrations/{20240308154949_temp-roles.ts => 20240312162549_temp-roles.ts} (100%) rename backend/src/db/migrations/{20240311093939_temp-role-identity.ts => 20240312162556_temp-role-identity.ts} (100%) diff --git a/backend/src/db/migrations/20240308154949_temp-roles.ts b/backend/src/db/migrations/20240312162549_temp-roles.ts similarity index 100% rename from backend/src/db/migrations/20240308154949_temp-roles.ts rename to backend/src/db/migrations/20240312162549_temp-roles.ts diff --git a/backend/src/db/migrations/20240311093939_temp-role-identity.ts b/backend/src/db/migrations/20240312162556_temp-role-identity.ts similarity index 100% rename from backend/src/db/migrations/20240311093939_temp-role-identity.ts rename to backend/src/db/migrations/20240312162556_temp-role-identity.ts diff --git a/backend/src/services/project-membership/project-membership-dal.ts b/backend/src/services/project-membership/project-membership-dal.ts index b3a2d52dc..8faab487e 100644 --- a/backend/src/services/project-membership/project-membership-dal.ts +++ b/backend/src/services/project-membership/project-membership-dal.ts @@ -53,11 +53,11 @@ export const projectMembershipDALFactory = (db: TDbClient) => { const members = sqlNestRelationships({ data: docs, - parentMapper: ({ email, firstName, lastName, publicKey, isGhost, id, userId }) => ({ + parentMapper: ({ email, firstName, username, lastName, publicKey, isGhost, id, userId }) => ({ id, userId, projectId, - user: { email, firstName, lastName, id: userId, publicKey, isGhost } + user: { email, username, firstName, lastName, id: userId, publicKey, isGhost } }), key: "id", childrenMapper: [ diff --git a/frontend/src/hooks/api/users/types.ts b/frontend/src/hooks/api/users/types.ts index 540ade9c1..edc3bdf9e 100644 --- a/frontend/src/hooks/api/users/types.ts +++ b/frontend/src/hooks/api/users/types.ts @@ -68,6 +68,7 @@ export type TWorkspaceUser = { id: string; user: { email: string; + username: string; firstName: string; lastName: string; id: string;