mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 14:44:54 +00:00
fixed the relation in fetching space
This commit is contained in:
@ -174,13 +174,17 @@ export class SpaceService {
|
|||||||
where: {
|
where: {
|
||||||
community: { uuid: communityUuid },
|
community: { uuid: communityUuid },
|
||||||
spaceName: Not(`${ORPHAN_SPACE_NAME}`),
|
spaceName: Not(`${ORPHAN_SPACE_NAME}`),
|
||||||
|
disabled: false,
|
||||||
},
|
},
|
||||||
relations: [
|
relations: [
|
||||||
'parent',
|
'parent',
|
||||||
'children',
|
'children',
|
||||||
'incomingConnections',
|
'incomingConnections',
|
||||||
'spaceProducts',
|
'tags',
|
||||||
'spaceProducts.product',
|
'tags.product',
|
||||||
|
'subspaces',
|
||||||
|
'subspaces.tags',
|
||||||
|
'subspaces.tags.product',
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -194,7 +198,7 @@ export class SpaceService {
|
|||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new HttpException(
|
throw new HttpException(
|
||||||
'An error occurred while fetching the spaces',
|
`An error occurred while fetching the spaces ${error}`,
|
||||||
HttpStatus.INTERNAL_SERVER_ERROR,
|
HttpStatus.INTERNAL_SERVER_ERROR,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -423,7 +427,7 @@ export class SpaceService {
|
|||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new HttpException(
|
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,
|
HttpStatus.INTERNAL_SERVER_ERROR,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user