Merge pull request #275 from SyncrowIOT/SP-1226-be-update-the-endpoint-to-list-space-with-tags-from-project

using new tags relation with space
This commit is contained in:
hannathkadher
2025-03-04 12:41:45 +04:00
committed by GitHub

View File

@ -236,12 +236,8 @@ export class SpaceService {
'incomingConnections.disabled = :incomingConnectionDisabled',
{ incomingConnectionDisabled: false },
)
.leftJoinAndSelect(
'space.tags',
'tags',
'tags.disabled = :tagDisabled',
{ tagDisabled: false },
)
.leftJoinAndSelect('space.productAllocations', 'productAllocations')
.leftJoinAndSelect('productAllocations.tags', 'tags')
.leftJoinAndSelect('tags.product', 'tagProduct')
.leftJoinAndSelect(
'space.subspaces',
@ -250,11 +246,10 @@ export class SpaceService {
{ subspaceDisabled: false },
)
.leftJoinAndSelect(
'subspaces.tags',
'subspaceTags',
'subspaceTags.disabled = :subspaceTagsDisabled',
{ subspaceTagsDisabled: false },
'subspaces.productAllocations',
'subspaceProductAllocations',
)
.leftJoinAndSelect('subspaceProductAllocations.tags', 'subspaceTags')
.leftJoinAndSelect('subspaceTags.product', 'subspaceTagProduct')
.leftJoinAndSelect('space.spaceModel', 'spaceModel')
.where('space.community_id = :communityUuid', { communityUuid })