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