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
1 changed files with 3 additions and 7 deletions

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)]