fix package

This commit is contained in:
Protryon 2021-04-19 18:16:13 -07:00
parent 6e68444e59
commit 6a6e8d536d
2 changed files with 6 additions and 2 deletions

View File

@ -70,6 +70,10 @@ impl Api {
}
}
pub fn host(&self) -> &str {
&*self.host
}
/// Get token for bearer auth, should be passed into Api through Context
pub fn auth_token(&self) -> Option<String> {
self.auth_token.clone()

View File

@ -17,7 +17,7 @@
use super::build::Build;
use crate::{
commands::Command,
context::{Context, PACKAGE_MANAGER_URL},
context::{Context},
};
use leo_package::{
outputs::OutputsDirectory,
@ -118,7 +118,7 @@ impl Command for Publish {
// Make a request to publish a package
let response = client
.post(format!("{}{}", PACKAGE_MANAGER_URL, PUBLISH_URL).as_str())
.post(format!("{}{}", context.api.host(), PUBLISH_URL).as_str())
.headers(headers)
.multipart(form_data)
.send();