Redirect app to new Nextcloud subdomain
This commit is contained in:
parent
98efdaaa82
commit
fc275d1bc9
1 changed files with 3 additions and 3 deletions
|
@ -89,7 +89,7 @@ pub struct Collection {
|
||||||
|
|
||||||
async fn get_folder_contents(url_tail: &str, password: &str) -> Result<String, Box<dyn std::error::Error>> {
|
async fn get_folder_contents(url_tail: &str, password: &str) -> Result<String, Box<dyn std::error::Error>> {
|
||||||
debug!("[get_folder_contents] Entering function...");
|
debug!("[get_folder_contents] Entering function...");
|
||||||
let root_url = Url::parse("https://theadamcooper.com")?;
|
let root_url = Url::parse("https://cloud.theadamcooper.com")?;
|
||||||
let method = reqwest::Method::from_bytes(b"PROPFIND").unwrap();
|
let method = reqwest::Method::from_bytes(b"PROPFIND").unwrap();
|
||||||
let client = reqwest::Client::new();
|
let client = reqwest::Client::new();
|
||||||
let url = root_url.join(url_tail)?;
|
let url = root_url.join(url_tail)?;
|
||||||
|
@ -122,7 +122,7 @@ async fn get_folder_contents(url_tail: &str, password: &str) -> Result<String, B
|
||||||
|
|
||||||
async fn publicise_it(path: &str, password: &str) -> Result<bool, Box<dyn std::error::Error>> {
|
async fn publicise_it(path: &str, password: &str) -> Result<bool, Box<dyn std::error::Error>> {
|
||||||
debug!("[publicise_it] Entering function...");
|
debug!("[publicise_it] Entering function...");
|
||||||
let url = "https://theadamcooper.com/nextcloud/ocs/v2.php/apps/files_sharing/api/v1/shares";
|
let url = "https://cloud.theadamcooper.com/ocs/v2.php/apps/files_sharing/api/v1/shares";
|
||||||
let method = reqwest::Method::POST;
|
let method = reqwest::Method::POST;
|
||||||
let client = reqwest::Client::new();
|
let client = reqwest::Client::new();
|
||||||
let params = [("path", path), ("shareType", "3")];
|
let params = [("path", path), ("shareType", "3")];
|
||||||
|
@ -232,7 +232,7 @@ async fn main() -> std::io::Result<()> {
|
||||||
|
|
||||||
let password: String = get_password().unwrap().trim().to_string();
|
let password: String = get_password().unwrap().trim().to_string();
|
||||||
let folder_contents: String =
|
let folder_contents: String =
|
||||||
get_folder_contents("/nextcloud/remote.php/dav/files/adam/test_public", &password)
|
get_folder_contents("/remote.php/dav/files/adam/test_public", &password)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue