mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 10:54:55 +00:00
task: update getOneSpace API to match revamp structure
This commit is contained in:
@ -271,7 +271,6 @@ export class SpaceService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo refactor this method to eliminate wrong use of tags
|
|
||||||
async findOne(params: GetSpaceParam): Promise<BaseResponseDto> {
|
async findOne(params: GetSpaceParam): Promise<BaseResponseDto> {
|
||||||
const { communityUuid, spaceUuid, projectUuid } = params;
|
const { communityUuid, spaceUuid, projectUuid } = params;
|
||||||
try {
|
try {
|
||||||
@ -282,19 +281,6 @@ export class SpaceService {
|
|||||||
|
|
||||||
const queryBuilder = this.spaceRepository
|
const queryBuilder = this.spaceRepository
|
||||||
.createQueryBuilder('space')
|
.createQueryBuilder('space')
|
||||||
.leftJoinAndSelect('space.parent', 'parent')
|
|
||||||
.leftJoinAndSelect(
|
|
||||||
'space.children',
|
|
||||||
'children',
|
|
||||||
'children.disabled = :disabled',
|
|
||||||
{ disabled: false },
|
|
||||||
)
|
|
||||||
.leftJoinAndSelect(
|
|
||||||
'space.incomingConnections',
|
|
||||||
'incomingConnections',
|
|
||||||
'incomingConnections.disabled = :incomingConnectionDisabled',
|
|
||||||
{ incomingConnectionDisabled: false },
|
|
||||||
)
|
|
||||||
.leftJoinAndSelect('space.productAllocations', 'productAllocations')
|
.leftJoinAndSelect('space.productAllocations', 'productAllocations')
|
||||||
.leftJoinAndSelect('productAllocations.tag', 'spaceTag')
|
.leftJoinAndSelect('productAllocations.tag', 'spaceTag')
|
||||||
.leftJoinAndSelect('productAllocations.product', 'spaceProduct')
|
.leftJoinAndSelect('productAllocations.product', 'spaceProduct')
|
||||||
|
|||||||
Reference in New Issue
Block a user