mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 23:27:31 +00:00
Revamp/space management (#409)
* task: add getCommunitiesV2 * task: update getOneSpace API to match revamp structure * refactor: implement modifications to pace management APIs * refactor: remove space link
This commit is contained in:
@ -5,11 +5,7 @@ import { DeviceService } from 'src/device/services';
|
||||
import { UserSpaceService } from 'src/users/services';
|
||||
import { DataSource } from 'typeorm';
|
||||
import { DisableSpaceCommand } from '../commands';
|
||||
import {
|
||||
SpaceLinkService,
|
||||
SpaceSceneService,
|
||||
SubSpaceService,
|
||||
} from '../services';
|
||||
import { SpaceSceneService, SubSpaceService } from '../services';
|
||||
|
||||
@CommandHandler(DisableSpaceCommand)
|
||||
export class DisableSpaceHandler
|
||||
@ -19,7 +15,6 @@ export class DisableSpaceHandler
|
||||
private readonly subSpaceService: SubSpaceService,
|
||||
private readonly userService: UserSpaceService,
|
||||
private readonly deviceService: DeviceService,
|
||||
private readonly spaceLinkService: SpaceLinkService,
|
||||
private readonly sceneService: SpaceSceneService,
|
||||
private readonly dataSource: DataSource,
|
||||
) {}
|
||||
@ -39,8 +34,6 @@ export class DisableSpaceHandler
|
||||
'subspaces',
|
||||
'parent',
|
||||
'devices',
|
||||
'outgoingConnections',
|
||||
'incomingConnections',
|
||||
'scenes',
|
||||
'children',
|
||||
'userSpaces',
|
||||
@ -79,7 +72,6 @@ export class DisableSpaceHandler
|
||||
orphanSpace,
|
||||
queryRunner,
|
||||
),
|
||||
this.spaceLinkService.deleteSpaceLink(space, queryRunner),
|
||||
this.sceneService.deleteScenes(space, queryRunner),
|
||||
];
|
||||
|
||||
|
Reference in New Issue
Block a user