Merge pull request #187 from SyncrowIOT/bugfix/fix-error-in-get-spaces

fixed the relation in fetching space
This commit is contained in:
hannathkadher
2024-12-31 10:15:43 +04:00
committed by GitHub

View File

@ -174,13 +174,17 @@ export class SpaceService {
where: {
community: { uuid: communityUuid },
spaceName: Not(`${ORPHAN_SPACE_NAME}`),
disabled: false,
},
relations: [
'parent',
'children',
'incomingConnections',
'spaceProducts',
'spaceProducts.product',
'tags',
'tags.product',
'subspaces',
'subspaces.tags',
'subspaces.tags.product',
],
});
@ -194,7 +198,7 @@ export class SpaceService {
});
} catch (error) {
throw new HttpException(
'An error occurred while fetching the spaces',
`An error occurred while fetching the spaces ${error}`,
HttpStatus.INTERNAL_SERVER_ERROR,
);
}
@ -423,7 +427,7 @@ export class SpaceService {
});
} catch (error) {
throw new HttpException(
'An error occurred while fetching the spaces under the space',
`An error occurred while fetching the spaces under the space ${error}`,
HttpStatus.INTERNAL_SERVER_ERROR,
);
}