Merge remote-tracking branch 'origin' into update/marketplace-for-brochure

This commit is contained in:
Lucy Cifferello
2024-06-26 16:29:15 -04:00
3 changed files with 15 additions and 3 deletions

View File

@@ -74,12 +74,14 @@ async fn do_upload(
mut url: Url,
user: &str,
pass: &str,
pkg_id: &str,
body: Body,
) -> Result<(), Error> {
url.set_path("/admin/v0/upload");
let req = httpc
.post(url)
.header(header::ACCEPT, "text/plain")
.query(&[("id", pkg_id)])
.basic_auth(user, Some(pass))
.body(body)
.build()?;
@@ -198,6 +200,7 @@ pub async fn publish(
registry.clone(),
&user,
&pass,
&pkg.id,
Body::wrap_stream(file_stream),
)
.await?;