mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 18:56:22 +00:00
Merge pull request #270 from SyncrowIOT/SP-1229-be-return-community-id-with-each-space-in-the-user-management
This commit is contained in:
@ -94,7 +94,7 @@ export class ProjectUserService {
|
|||||||
'invitedBy',
|
'invitedBy',
|
||||||
'isEnabled',
|
'isEnabled',
|
||||||
],
|
],
|
||||||
relations: ['roleType', 'spaces.space'],
|
relations: ['roleType', 'spaces.space', 'spaces.space.community'],
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!user) {
|
if (!user) {
|
||||||
@ -114,7 +114,14 @@ export class ProjectUserService {
|
|||||||
roleType: user.roleType.type,
|
roleType: user.roleType.type,
|
||||||
createdDate,
|
createdDate,
|
||||||
createdTime,
|
createdTime,
|
||||||
spaces: user.spaces.map((space) => space.space),
|
spaces: user.spaces.map(({ space }) => {
|
||||||
|
const { community, ...spaceWithoutCommunity } = space;
|
||||||
|
return {
|
||||||
|
...spaceWithoutCommunity,
|
||||||
|
communityUuid: community.uuid,
|
||||||
|
communityName: community.name,
|
||||||
|
};
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
statusCode: HttpStatus.OK,
|
statusCode: HttpStatus.OK,
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user