changed endpoint for automation update

This commit is contained in:
hannathkadher
2025-03-14 12:16:32 +04:00
parent bc64efa557
commit e0486deecb
3 changed files with 15 additions and 7 deletions

View File

@ -166,10 +166,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),
path: ApiEndpoints.updateAutomation
.replaceAll('{automationId}', automationId)
.replaceAll('{projectId}', projectId),
body: createAutomationModel.toJson(automationId.isNotEmpty == true ? automationId : null),
expectedResponseModel: (json) {
return json;