diff options
Diffstat (limited to 'makima/src/daemon/api')
| -rw-r--r-- | makima/src/daemon/api/supervisor.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/makima/src/daemon/api/supervisor.rs b/makima/src/daemon/api/supervisor.rs index a1e8682..0a68980 100644 --- a/makima/src/daemon/api/supervisor.rs +++ b/makima/src/daemon/api/supervisor.rs @@ -211,4 +211,21 @@ impl ApiClient { }; self.post("/api/v1/mesh/supervisor/questions", &req).await } + + /// Advance contract to a new phase. + pub async fn supervisor_advance_phase( + &self, + contract_id: Uuid, + phase: &str, + ) -> Result<JsonValue, ApiError> { + #[derive(Serialize)] + struct AdvancePhaseRequest { + phase: String, + } + let req = AdvancePhaseRequest { + phase: phase.to_string(), + }; + self.post(&format!("/api/v1/contracts/{}/phase", contract_id), &req) + .await + } } |
