Remove unused template parameters in get_index

This commit is contained in:
Sijmen 2023-04-27 14:07:53 +02:00
parent 9138ce4cc9
commit 4843be7dc2
Signed by: vijfhoek
GPG key ID: DAF7821E067D9C48

View file

@ -13,9 +13,7 @@ mod mpd;
#[derive(Template)] #[derive(Template)]
#[template(path = "index.html")] #[template(path = "index.html")]
struct IndexTemplate { struct IndexTemplate;
path: String,
}
#[derive(Deserialize, Default)] #[derive(Deserialize, Default)]
#[serde(default)] #[serde(default)]
@ -23,10 +21,8 @@ struct IndexQuery {
path: String, path: String,
} }
async fn get_index(req: tide::Request<()>) -> tide::Result { async fn get_index(_req: tide::Request<()>) -> tide::Result {
let query: IndexQuery = req.query()?; Ok(askama_tide::into_response(&IndexTemplate))
let template = IndexTemplate { path: query.path };
Ok(askama_tide::into_response(&template))
} }
#[derive(Template)] #[derive(Template)]