Skip to content

Commit

Permalink
Merge pull request #197 from Enraged-Dun-Cookie-Development-Team/fix-…
Browse files Browse the repository at this point in the history
…修复路由拼接

🐛 修复腾讯云路由拼接(合并和revert出错)
  • Loading branch information
phidiaLam authored Jun 10, 2024
2 parents 6c85e22 + fd53dc0 commit f9cff71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion logic/bakery_logic/src/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl BakeryTcCdnPath {
}

PurgeCachePath::new_with_query(
"/canteen/bakery/mansionInfo",
"/cdn/bakery/mansionInfo",
&MansionId { mansion_id: mid },
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use general_request_client::Url;
use serde::Serialize;
use url::Position;

use super::{SERVICE, VERSION};
use crate::{
Expand Down Expand Up @@ -45,7 +46,8 @@ impl TcCloudManager {
.into_iter()
.map(|PurgeCachePath { path, query }| {
let mut url = Url::clone(&*self.cdn_base_url);
url.set_path(path);
let prefix = &url[Position::BeforePath..];
url.set_path(&(prefix.to_string() + path));
url.set_query(query.as_deref());
url
})
Expand All @@ -72,6 +74,7 @@ mod test {
use mime::Mime;
use serde::Serialize;
use typed_builder::TypedBuilder;
use url::{Position, Url};

#[derive(Debug, Clone, TypedBuilder)]
pub struct RequestContent<P: Serialize, Q: Serialize + Clone> {
Expand Down

0 comments on commit f9cff71

Please sign in to comment.