mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
update registry upload to take id for new admin permissions (#2605)
This commit is contained in:
@@ -71,12 +71,14 @@ async fn do_upload(
|
|||||||
mut url: Url,
|
mut url: Url,
|
||||||
user: &str,
|
user: &str,
|
||||||
pass: &str,
|
pass: &str,
|
||||||
|
pkg_id: &str,
|
||||||
body: Body,
|
body: Body,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
url.set_path("/admin/v0/upload");
|
url.set_path("/admin/v0/upload");
|
||||||
let req = httpc
|
let req = httpc
|
||||||
.post(url)
|
.post(url)
|
||||||
.header(header::ACCEPT, "text/plain")
|
.header(header::ACCEPT, "text/plain")
|
||||||
|
.query(&["id", pkg_id])
|
||||||
.basic_auth(user, Some(pass))
|
.basic_auth(user, Some(pass))
|
||||||
.body(body)
|
.body(body)
|
||||||
.build()?;
|
.build()?;
|
||||||
@@ -178,6 +180,7 @@ pub async fn publish(
|
|||||||
registry.clone(),
|
registry.clone(),
|
||||||
&user,
|
&user,
|
||||||
&pass,
|
&pass,
|
||||||
|
&pkg.id,
|
||||||
Body::wrap_stream(file_stream),
|
Body::wrap_stream(file_stream),
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|||||||
Reference in New Issue
Block a user