refactor: apply new vfmt defaults

This commit is contained in:
Jef Roosens 2022-05-14 20:06:08 +02:00
parent 53f5b68d08
commit 5f21e256ee
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
24 changed files with 138 additions and 138 deletions

View file

@ -7,7 +7,7 @@ import time
// get_build_logs returns all build logs.
pub fn (c &Client) get_build_logs() ?Response<[]BuildLog> {
data := c.send_request<[]BuildLog>(Method.get, '/api/logs', {}) ?
data := c.send_request<[]BuildLog>(Method.get, '/api/logs', {})?
return data
}
@ -18,21 +18,21 @@ pub fn (c &Client) get_build_logs_for_repo(repo_id int) ?Response<[]BuildLog> {
'repo': repo_id.str()
}
data := c.send_request<[]BuildLog>(Method.get, '/api/logs', params) ?
data := c.send_request<[]BuildLog>(Method.get, '/api/logs', params)?
return data
}
// get_build_log returns a specific build log.
pub fn (c &Client) get_build_log(id int) ?Response<BuildLog> {
data := c.send_request<BuildLog>(Method.get, '/api/logs/$id', {}) ?
data := c.send_request<BuildLog>(Method.get, '/api/logs/$id', {})?
return data
}
// get_build_log_content returns the contents of the build log file.
pub fn (c &Client) get_build_log_content(id int) ?string {
data := c.send_request_raw_response(Method.get, '/api/logs/$id/content', {}, '') ?
data := c.send_request_raw_response(Method.get, '/api/logs/$id/content', {}, '')?
return data
}
@ -47,7 +47,7 @@ pub fn (c &Client) add_build_log(repo_id int, start_time time.Time, end_time tim
'exitCode': exit_code.str()
}
data := c.send_request_with_body<string>(Method.post, '/api/logs', params, content) ?
data := c.send_request_with_body<string>(Method.post, '/api/logs', params, content)?
return data
}