@smbcloud / cli / commits / f378787

cleanup

Seto Elkahfi committed May 31, 2025 at 19:35 UTC f3787879668c19a0b30b75e856e42dbd70928d30
1 file changed +1 -35
crates/smbcloud-networking-project/src/crud_project_deployment_create.rs
+1 -35
@@ -34,38 +34,4 @@ pub async fn create(
34 }
35 _ => Err(anyhow!("Something wrong.")),
36 }
37 -}
38 -
39 -pub async fn update(
40 - env: Environment,
41 - project_id: i32,
42 - deployment_id: i32,
43 - payload: DeploymentPayload,
44 -) -> Result<Deployment> {
45 - // Get current token
46 - let token = get_smb_token(env).await?;
47 -
48 - debug!("Current token: {}", token);
49 -
50 - let url = format!(
51 - "{}/{}",
52 - build_project_deployment_index(env, project_id.to_string()),
53 - deployment_id
54 - );
55 -
56 - let response = Client::new()
57 - .put(url)
58 - .json(&payload)
59 - .header("Authorization", token)
60 - .header("User-agent", SMB_USER_AGENT)
61 - .send()
62 - .await?;
63 -
64 - match response.status() {
65 - reqwest::StatusCode::OK => {
66 - let deployment: Deployment = response.json().await?;
67 - Ok(deployment)
68 - }
69 - _ => Err(anyhow!("Failed to update deployment.")),
70 - }
71 -}
37 +}
\ No newline at end of file