mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
fix image on tab to run, and add delete for automation and scene
This commit is contained in:
@ -212,38 +212,39 @@ class SceneApi {
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //delete Scene
|
||||
//
|
||||
// static Future<bool> deleteScene(
|
||||
// {required String unitUuid, required String sceneId}) async {
|
||||
// try {
|
||||
// final response = await _httpService.delete(
|
||||
// path: ApiEndpoints.deleteScene
|
||||
// .replaceAll('{sceneId}', sceneId)
|
||||
// .replaceAll('{unitUuid}', unitUuid),
|
||||
// showServerMessage: false,
|
||||
// expectedResponseModel: (json) => json['statusCode'] == 200,
|
||||
// );
|
||||
// return response;
|
||||
// } catch (e) {
|
||||
// rethrow;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // delete automation
|
||||
// static Future<bool> deleteAutomation(
|
||||
// {required String unitUuid, required String automationId}) async {
|
||||
// try {
|
||||
// final response = await _httpService.delete(
|
||||
// path: ApiEndpoints.deleteAutomation
|
||||
// .replaceAll('{automationId}', automationId)
|
||||
// .replaceAll('{unitUuid}', unitUuid),
|
||||
// showServerMessage: false,
|
||||
// expectedResponseModel: (json) => json['statusCode'] == 200,
|
||||
// );
|
||||
// return response;
|
||||
// } catch (e) {
|
||||
// rethrow;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
//delete Scene
|
||||
static Future<bool> deleteScene(
|
||||
{required String unitUuid, required String sceneId}) async {
|
||||
try {
|
||||
final response = await _httpService.delete(
|
||||
path: ApiEndpoints.deleteScene
|
||||
.replaceAll('{sceneId}', sceneId)
|
||||
.replaceAll('{unitUuid}', unitUuid),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) => json['statusCode'] == 200,
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
// delete automation
|
||||
static Future<bool> deleteAutomation(
|
||||
{required String unitUuid, required String automationId}) async {
|
||||
try {
|
||||
final response = await _httpService.delete(
|
||||
path: ApiEndpoints.deleteAutomation
|
||||
.replaceAll('{automationId}', automationId)
|
||||
.replaceAll('{unitUuid}', unitUuid),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) => json['statusCode'] == 200,
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user