This commit is contained in:
Mateusz Gruszczyński committed 2026-10-21 08:08:59 +02:00
1 parent 05185a94f7
commit bb5caa769f
28 files changed
+592 -130

No files matched your search

+6 -5
View File
@@ -243,11 +243,12 @@ async fn get_automation(
State(state): State<AppState>,
Path(id): Path<String>,
) -> Result<Json<Automation>, AppError> {
state
.db
.get_automation(&id)?
.map(Json)
.ok_or_else(|| AppError::NotFound(format!("automation {id}")))
let mut item = state.db.get_automation(&id)?
.ok_or_else(|| AppError::NotFound(format!("automation {id}")))?;
if !state.db.flow_output_enabled(item.flow_id.as_deref())? {
item.enabled = false;
}
Ok(Json(item))
}
async fn create_automation(
State(state): State<AppState>,