From 9e286c146e29e714b3b209b4d948d75cce179b05 Mon Sep 17 00:00:00 2001 From: soryu Date: Wed, 21 Jan 2026 17:32:49 +0000 Subject: Enforce phaseguard --- makima/src/daemon/api/contract.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'makima/src/daemon') diff --git a/makima/src/daemon/api/contract.rs b/makima/src/daemon/api/contract.rs index 50fd64f..12ebe95 100644 --- a/makima/src/daemon/api/contract.rs +++ b/makima/src/daemon/api/contract.rs @@ -247,4 +247,29 @@ impl ApiClient { self.get(&format!("/api/v1/settings/repository-history/suggestions{}", query_string)) .await } + + /// Add a remote repository to a contract. + pub async fn add_remote_repository( + &self, + contract_id: Uuid, + name: &str, + repository_url: &str, + is_primary: bool, + ) -> Result { + let req = AddRemoteRepositoryRequest { + name: name.to_string(), + repository_url: repository_url.to_string(), + is_primary, + }; + self.post(&format!("/api/v1/contracts/{}/repositories/remote", contract_id), &req) + .await + } +} + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +struct AddRemoteRepositoryRequest { + name: String, + repository_url: String, + is_primary: bool, } -- cgit v1.2.3