fix(url): remove manual url decoding
This commit is contained in:
parent
bca34d1ebc
commit
b9f3214a38
1 changed files with 1 additions and 4 deletions
|
@ -82,10 +82,7 @@ async fn get_items_handler(
|
||||||
db: web::Data<Arc<Mutex<Database>>>,
|
db: web::Data<Arc<Mutex<Database>>>,
|
||||||
url: web::Path<String>,
|
url: web::Path<String>,
|
||||||
) -> impl Responder {
|
) -> impl Responder {
|
||||||
let decoded_url = urlencoding::decode(&url)
|
get_items(db, web::Query(url.into_inner())).await
|
||||||
.map(|cow| cow.into_owned())
|
|
||||||
.unwrap_or_default();
|
|
||||||
get_items(db, web::Query(decoded_url)).await
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handler to create an item for a specific URL
|
// Handler to create an item for a specific URL
|
||||||
|
|
Loading…
Add table
Reference in a new issue