mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-15 19:28:00 +01:00
DRY-up
This commit is contained in:
@@ -70,13 +70,9 @@ async fn create_recording_request(
|
|||||||
let mut url = server_url.clone();
|
let mut url = server_url.clone();
|
||||||
url.set_path("api/v1/recordings");
|
url.set_path("api/v1/recordings");
|
||||||
let form = Form::new().file("file", path).await?;
|
let form = Form::new().file("file", path).await?;
|
||||||
|
let builder = client.post(url).multipart(form);
|
||||||
|
|
||||||
Ok(client
|
Ok(add_headers(builder, &install_id))
|
||||||
.post(url)
|
|
||||||
.multipart(form)
|
|
||||||
.basic_auth(get_username(), Some(install_id))
|
|
||||||
.header(header::USER_AGENT, build_user_agent())
|
|
||||||
.header(header::ACCEPT, "application/json"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn list_user_streams(prefix: &str, config: &Config) -> Result<Vec<StreamResponse>> {
|
pub async fn list_user_streams(prefix: &str, config: &Config) -> Result<Vec<StreamResponse>> {
|
||||||
|
|||||||
Reference in New Issue
Block a user