From 6df6716820fd6772b44d65f25c93de9b77d57068 Mon Sep 17 00:00:00 2001 From: hannathkadher Date: Mon, 30 Dec 2024 22:27:56 +0400 Subject: [PATCH] fixed the relation in fetching space --- src/space/services/space.service.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/space/services/space.service.ts b/src/space/services/space.service.ts index 9badabb..fc01bd7 100644 --- a/src/space/services/space.service.ts +++ b/src/space/services/space.service.ts @@ -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, ); }