fixed get spaces

This commit is contained in:
hannathkadher
2025-03-09 14:03:59 +04:00
parent 226781e53f
commit 63f1f7a7c0
2 changed files with 2 additions and 14 deletions

View File

@ -276,10 +276,11 @@ export class SpaceService {
const spaces = await queryBuilder.getMany();
const transformedSpaces = spaces.map(this.transformSpace);
const spaceHierarchy = this.buildSpaceHierarchy(transformedSpaces);
return new SuccessResponseDto({
message: `Spaces in community ${communityUuid} successfully fetched in hierarchy`,
data: onlyWithDevices ? spaces : transformedSpaces,
data: onlyWithDevices ? spaces : spaceHierarchy,
statusCode: HttpStatus.OK,
});
} catch (error) {