Remove unused template parameters in get_index
This commit is contained in:
parent
9138ce4cc9
commit
4843be7dc2
1 changed files with 3 additions and 7 deletions
10
src/main.rs
10
src/main.rs
|
@ -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)]
|
||||||
|
|
Loading…
Reference in a new issue