Added subspace entity

This commit is contained in:
hannathkadher
2024-10-25 13:59:25 +04:00
parent 58a060e076
commit 6d6560b3e0
9 changed files with 89 additions and 7 deletions

View File

@ -10,7 +10,7 @@ export class UserSpaceService {
async getSpacesForUser(userUuid: string): Promise<BaseResponseDto> {
const userSpaces = await this.userSpaceRepository.find({
where: { user: { uuid: userUuid } },
relations: ['space'],
relations: ['space', 'space.community'],
});
if (!userSpaces || userSpaces.length === 0) {
@ -20,7 +20,6 @@ export class UserSpaceService {
);
}
return new SuccessResponseDto({
data: userSpaces,
message: `Spaces for user ${userUuid} retrieved successfully`,