mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-17 03:05:13 +00:00
fixed get spaces
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user