mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-20 12:45:22 +00:00
added controller to export
This commit is contained in:
@ -18,7 +18,6 @@ import { In, QueryRunner } from 'typeorm';
|
||||
import { SubspaceModelEntity } from '@app/common/modules/space-model';
|
||||
import { ValidationService } from '../space-validation.service';
|
||||
import { SubspaceRepository } from '@app/common/modules/space/repositories/subspace.repository';
|
||||
import { TagService } from '../tag';
|
||||
import { ModifyAction } from '@app/common/constants/modify-action.enum';
|
||||
import { SubspaceDeviceService } from './subspace-device.service';
|
||||
import { ModifyTagDto } from 'src/space/dtos/tag/modify-tag.dto';
|
||||
@ -34,7 +33,6 @@ export class SubSpaceService {
|
||||
constructor(
|
||||
private readonly subspaceRepository: SubspaceRepository,
|
||||
private readonly validationService: ValidationService,
|
||||
private readonly tagService: TagService,
|
||||
private readonly newTagService: NewTagService,
|
||||
public readonly deviceService: SubspaceDeviceService,
|
||||
private readonly subspaceProductAllocationService: SubspaceProductAllocationService,
|
||||
@ -481,21 +479,6 @@ export class SubSpaceService {
|
||||
{ disabled: true },
|
||||
);
|
||||
|
||||
if (subspace.tags?.length) {
|
||||
const modifyTagDtos: ProcessTagDto[] = subspace.tags.map((tag) => ({
|
||||
uuid: tag.uuid,
|
||||
action: ModifyAction.ADD,
|
||||
name: tag.tag,
|
||||
productUuid: tag.product.uuid,
|
||||
}));
|
||||
await this.tagService.moveTags(
|
||||
modifyTagDtos,
|
||||
queryRunner,
|
||||
subspace.space,
|
||||
null,
|
||||
);
|
||||
}
|
||||
|
||||
if (subspace.devices.length > 0) {
|
||||
await this.deviceService.deleteSubspaceDevices(
|
||||
subspace.devices,
|
||||
|
Reference in New Issue
Block a user