removed logs

This commit is contained in:
hannathkadher
2025-01-31 11:07:06 +04:00
parent f77d52b6be
commit a8f966a221
5 changed files with 63 additions and 63 deletions

View File

@ -172,8 +172,6 @@ export class SpaceService {
): Promise<BaseResponseDto> {
const { communityUuid, projectUuid } = params;
const { onlyWithDevices } = getSpaceDto;
console.log('onlyWithDevices', onlyWithDevices);
await this.validationService.validateCommunityAndProject(
communityUuid,
projectUuid,
@ -244,12 +242,53 @@ export class SpaceService {
async findOne(params: GetSpaceParam): Promise<BaseResponseDto> {
const { communityUuid, spaceUuid, projectUuid } = params;
try {
const space =
await this.validationService.validateSpaceWithinCommunityAndProject(
communityUuid,
projectUuid,
spaceUuid,
);
await this.validationService.validateCommunityAndProject(
communityUuid,
projectUuid,
);
const queryBuilder = this.spaceRepository
.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.tags',
'tags',
'tags.disabled = :tagDisabled',
{ tagDisabled: false },
)
.leftJoinAndSelect('tags.product', 'tagProduct')
.leftJoinAndSelect(
'space.subspaces',
'subspaces',
'subspaces.disabled = :subspaceDisabled',
{ subspaceDisabled: false },
)
.leftJoinAndSelect(
'subspaces.tags',
'subspaceTags',
'subspaceTags.disabled = :subspaceTagsDisabled',
{ subspaceTagsDisabled: false },
)
.leftJoinAndSelect('subspaceTags.product', 'subspaceTagProduct')
.where('space.community_id = :communityUuid', { communityUuid })
.andWhere('space.spaceName != :orphanSpaceName', {
orphanSpaceName: ORPHAN_SPACE_NAME,
})
.andWhere('space.disabled = :disabled', { disabled: false });
const space = await queryBuilder.getOne();
return new SuccessResponseDto({
message: `Space with ID ${spaceUuid} successfully fetched`,
@ -323,8 +362,7 @@ export class SpaceService {
updateSpaceDto: UpdateSpaceDto,
): Promise<BaseResponseDto> {
const { communityUuid, spaceUuid, projectUuid } = params;
console.log(communityUuid, spaceUuid, projectUuid);
console.log(updateSpaceDto);
const queryRunner = this.dataSource.createQueryRunner();
try {