Improve URL handling (#11)
This commit is contained in:
parent
7d00d6f863
commit
e77b79afae
1 changed files with 2 additions and 1 deletions
|
@ -153,7 +153,8 @@ async fn get_folder_contents(url_tail: &str, config: &Config) -> Result<String,
|
|||
|
||||
async fn publicise_it(path: &str, config: &Config) -> Result<bool, Box<dyn std::error::Error>> {
|
||||
debug!("[publicise_it] Entering function...");
|
||||
let url = "https://cloud.theadamcooper.com/ocs/v2.php/apps/files_sharing/api/v1/shares";
|
||||
let base_url = Url::parse(config.paths.root.as_str())?;
|
||||
let url = base_url.join("ocs/v2.php/apps/files_sharing/api/v1/shares")?;
|
||||
let method = reqwest::Method::POST;
|
||||
let client = reqwest::Client::new();
|
||||
let params = [("path", path), ("shareType", "3")];
|
||||
|
|
Loading…
Reference in a new issue