diff --git a/logic/bakery_logic/src/view.rs b/logic/bakery_logic/src/view.rs index a1ea330d..f07be2cd 100644 --- a/logic/bakery_logic/src/view.rs +++ b/logic/bakery_logic/src/view.rs @@ -170,7 +170,7 @@ impl BakeryTcCdnPath { } PurgeCachePath::new_with_query( - "/cdn/bakery/mansionInfo", + "/canteen/bakery/mansionInfo", &MansionId { mansion_id: mid }, ) } diff --git a/middle-server/tencent-cloud-server/src/cdn/purge_urls_cache.rs b/middle-server/tencent-cloud-server/src/cdn/purge_urls_cache.rs index 7f916ad7..c4a5e4b3 100644 --- a/middle-server/tencent-cloud-server/src/cdn/purge_urls_cache.rs +++ b/middle-server/tencent-cloud-server/src/cdn/purge_urls_cache.rs @@ -1,6 +1,5 @@ use general_request_client::Url; use serde::Serialize; -use url::Position; use super::{SERVICE, VERSION}; use crate::{ @@ -46,8 +45,7 @@ impl TcCloudManager { .into_iter() .map(|PurgeCachePath { path, query }| { let mut url = Url::clone(&*self.cdn_base_url); - let prefix = &url[Position::BeforePath..]; - url.set_path(&(prefix.to_string() + path)); + url.set_path(path); url.set_query(query.as_deref()); url }) @@ -74,7 +72,6 @@ mod test { use mime::Mime; use serde::Serialize; use typed_builder::TypedBuilder; - use url::{Position, Url}; #[derive(Debug, Clone, TypedBuilder)] pub struct RequestContent { @@ -97,13 +94,4 @@ mod test { println!("{}", canonical_query); } - - #[test] - fn test_url() { - let mut url = Url::parse("http://server-cdn-dev.ceobecanteen.top/api/v1").unwrap(); - - let prefix = &url[Position::BeforePath..]; - url.set_path(&(prefix.to_string() + "/test/test")); - println!("{}", url) - } }