fix tests
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled

This commit is contained in:
2025-07-17 21:48:31 +02:00
parent 7be9339645
commit 2f5d483bff
2 changed files with 7 additions and 5 deletions

View File

@@ -62,7 +62,8 @@ async fn index_loggedin(
&UserWithDetails::from_user(user.into_inner(), db).await,
);
index(db, flash, context).await
let context = index(db, flash, context).await;
Template::render("log", context.into_json())
}
#[get("/")]
@@ -78,10 +79,11 @@ async fn index_kiosk(
context.insert("show_kiosk_header", &true);
index(db, flash, context).await
let context = index(db, flash, context).await;
Template::render("kiosk", context.into_json())
}
async fn index(db: &SqlitePool, flash: Option<FlashMessage<'_>>, mut context: Context) -> Template {
async fn index(db: &SqlitePool, flash: Option<FlashMessage<'_>>, mut context: Context) -> Context {
if let Some(msg) = flash {
context.insert("flash", &msg.into_inner());
}
@@ -120,7 +122,7 @@ async fn index(db: &SqlitePool, flash: Option<FlashMessage<'_>>, mut context: Co
context.insert("on_water", &on_water);
context.insert("distances", &distances);
Template::render("kiosk", context.into_json())
context
}
#[get("/show", rank = 3)]