home: wip news

This commit is contained in:
Agahnim 2026-03-23 15:27:52 +01:00
parent f360250b57
commit a753fd3497
9 changed files with 507 additions and 19 deletions

View file

@ -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(),