mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-08-26 09:59:40 +00:00
updated endpoint for update automation
This commit is contained in:
@ -161,7 +161,7 @@ abstract class ApiEndpoints {
|
||||
/// PUT
|
||||
static const String updateScene = '/scene/tap-to-run/{sceneId}';
|
||||
|
||||
static const String updateAutomation = '/automation/{automationId}';
|
||||
static const String updateAutomation = '/projects/{projectId}/automations/{automationId}';
|
||||
|
||||
static const String updateAutomationStatus =
|
||||
'/automation/status/{automationId}';
|
||||
|
@ -202,12 +202,13 @@ class SceneApi {
|
||||
}
|
||||
|
||||
//update automation
|
||||
static updateAutomation(
|
||||
CreateAutomationModel createAutomationModel, String automationId) async {
|
||||
static updateAutomation(CreateAutomationModel createAutomationModel,
|
||||
String automationId, String projectId) async {
|
||||
try {
|
||||
final response = await _httpService.put(
|
||||
path: ApiEndpoints.updateAutomation
|
||||
.replaceAll('{automationId}', automationId),
|
||||
.replaceAll('{automationId}', automationId)
|
||||
.replaceAll('{projectId}', projectId),
|
||||
body: createAutomationModel
|
||||
.toJson(automationId.isNotEmpty == true ? automationId : null),
|
||||
expectedResponseModel: (json) {
|
||||
|
Reference in New Issue
Block a user