mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
updated delete automation endpoint
This commit is contained in:
@ -798,6 +798,8 @@ class RoutineBloc extends Bloc<RoutineEvent, RoutineState> {
|
||||
|
||||
FutureOr<void> _deleteScene(DeleteScene event, Emitter<RoutineState> emit) async {
|
||||
try {
|
||||
final projectId = await ProjectManager.getProjectUUID() ?? '';
|
||||
|
||||
emit(state.copyWith(isLoading: true));
|
||||
BuildContext context = NavigationService.navigatorKey.currentContext!;
|
||||
var spaceBloc = context.read<SpaceTreeBloc>();
|
||||
@ -806,7 +808,7 @@ class RoutineBloc extends Bloc<RoutineEvent, RoutineState> {
|
||||
unitUuid: spaceBloc.state.selectedSpaces[0], sceneId: state.sceneId ?? '');
|
||||
} else {
|
||||
await SceneApi.deleteAutomation(
|
||||
unitUuid: spaceBloc.state.selectedSpaces[0], automationId: state.automationId ?? '');
|
||||
unitUuid: spaceBloc.state.selectedSpaces[0], automationId: state.automationId ?? '',projectId: projectId);
|
||||
}
|
||||
|
||||
add(const LoadScenes());
|
||||
|
Reference in New Issue
Block a user