Skip to content

Commit 3fe10b3

Browse files
committed
Format fixes
1 parent 91aa6f8 commit 3fe10b3

4 files changed

Lines changed: 11 additions & 30 deletions

File tree

src/commands/account.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,10 @@ pub fn secret_update(
456456
) -> Result<(), ApiError> {
457457
let body = UpdateSecretRequest { key, value };
458458

459-
let response: Value = client.put(&format!("/api/v1/vector/global-secrets/{}", secret_id), &body)?;
459+
let response: Value = client.put(
460+
&format!("/api/v1/vector/global-secrets/{}", secret_id),
461+
&body,
462+
)?;
460463

461464
if format == OutputFormat::Json {
462465
print_json(&response);

src/commands/deploy.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,7 @@ pub fn list(
6767
Ok(())
6868
}
6969

70-
pub fn show(
71-
client: &ApiClient,
72-
deploy_id: &str,
73-
format: OutputFormat,
74-
) -> Result<(), ApiError> {
70+
pub fn show(client: &ApiClient, deploy_id: &str, format: OutputFormat) -> Result<(), ApiError> {
7571
let response: Value = client.get(&format!("/api/v1/vector/deployments/{}", deploy_id))?;
7672

7773
if format == OutputFormat::Json {
@@ -116,11 +112,7 @@ pub fn show(
116112
Ok(())
117113
}
118114

119-
pub fn trigger(
120-
client: &ApiClient,
121-
env_id: &str,
122-
format: OutputFormat,
123-
) -> Result<(), ApiError> {
115+
pub fn trigger(client: &ApiClient, env_id: &str, format: OutputFormat) -> Result<(), ApiError> {
124116
let response: Value = client.post_empty(&format!(
125117
"/api/v1/vector/environments/{}/deployments",
126118
env_id

src/commands/env.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,7 @@ pub fn list(
105105
Ok(())
106106
}
107107

108-
pub fn show(
109-
client: &ApiClient,
110-
env_id: &str,
111-
format: OutputFormat,
112-
) -> Result<(), ApiError> {
108+
pub fn show(client: &ApiClient, env_id: &str, format: OutputFormat) -> Result<(), ApiError> {
113109
let response: Value = client.get(&format!("/api/v1/vector/environments/{}", env_id))?;
114110

115111
if format == OutputFormat::Json {
@@ -214,8 +210,7 @@ pub fn update(
214210
tags,
215211
};
216212

217-
let response: Value =
218-
client.put(&format!("/api/v1/vector/environments/{}", env_id), &body)?;
213+
let response: Value = client.put(&format!("/api/v1/vector/environments/{}", env_id), &body)?;
219214

220215
if format == OutputFormat::Json {
221216
print_json(&response);
@@ -226,11 +221,7 @@ pub fn update(
226221
Ok(())
227222
}
228223

229-
pub fn delete(
230-
client: &ApiClient,
231-
env_id: &str,
232-
format: OutputFormat,
233-
) -> Result<(), ApiError> {
224+
pub fn delete(client: &ApiClient, env_id: &str, format: OutputFormat) -> Result<(), ApiError> {
234225
let response: Value = client.delete(&format!("/api/v1/vector/environments/{}", env_id))?;
235226

236227
if format == OutputFormat::Json {
@@ -381,8 +372,7 @@ pub fn secret_update(
381372
) -> Result<(), ApiError> {
382373
let body = UpdateSecretRequest { key, value };
383374

384-
let response: Value =
385-
client.put(&format!("/api/v1/vector/secrets/{}", secret_id), &body)?;
375+
let response: Value = client.put(&format!("/api/v1/vector/secrets/{}", secret_id), &body)?;
386376

387377
if format == OutputFormat::Json {
388378
print_json(&response);

src/commands/ssl.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ struct NudgeRequest {
1212
retry: bool,
1313
}
1414

15-
pub fn status(
16-
client: &ApiClient,
17-
env_id: &str,
18-
format: OutputFormat,
19-
) -> Result<(), ApiError> {
15+
pub fn status(client: &ApiClient, env_id: &str, format: OutputFormat) -> Result<(), ApiError> {
2016
let response: Value = client.get(&format!("/api/v1/vector/environments/{}/ssl", env_id))?;
2117

2218
if format == OutputFormat::Json {

0 commit comments

Comments
 (0)