]> Untitled Git - lemmy.git/blobdiff - crates/routes/src/feeds.rs
Upgrading deps, running clippy fix on nightly 1.55.0 (#1638)
[lemmy.git] / crates / routes / src / feeds.rs
index 8250d3c6e50c9e683f2c61f0b074bead4450cace..75542e740da352e0dd7389d3d6bfd98531e51d5b 100644 (file)
@@ -124,12 +124,15 @@ async fn get_feed_data(
 }
 
 async fn get_feed(
-  web::Path((req_type, param)): web::Path<(String, String)>,
+  req: HttpRequest,
   info: web::Query<Params>,
   context: web::Data<LemmyContext>,
 ) -> Result<HttpResponse, Error> {
   let sort_type = get_sort_type(info).map_err(ErrorBadRequest)?;
 
+  let req_type: String = req.match_info().get("type").unwrap_or("none").parse()?;
+  let param: String = req.match_info().get("name").unwrap_or("none").parse()?;
+
   let request_type = match req_type.as_str() {
     "u" => RequestType::User,
     "c" => RequestType::Community,