home: wip news
This commit is contained in:
parent
f360250b57
commit
a753fd3497
9 changed files with 507 additions and 19 deletions
|
|
@ -11,8 +11,8 @@ use crate::domain::AppState;
|
|||
|
||||
#[derive(Template)]
|
||||
#[template(path = "notfound.html")]
|
||||
struct NotfoundTemplate {
|
||||
tracks: Vec<crate::domain::Track>,
|
||||
struct NotfoundTemplate<'a> {
|
||||
tracks: &'a Vec<crate::domain::Track>,
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
|
|
@ -25,7 +25,7 @@ pub async fn notfound(headers: HeaderMap, state: State<Arc<AppState>>) -> impl I
|
|||
} else {
|
||||
Html(
|
||||
NotfoundTemplate {
|
||||
tracks: state.mp_tracks.clone(),
|
||||
tracks: &state.mp_tracks,
|
||||
}
|
||||
.render()
|
||||
.unwrap(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue