fix js errors

This commit is contained in:
philipp 2023-10-24 11:01:35 +02:00
parent beb5f3a217
commit 8f28553608
3 changed files with 4 additions and 4 deletions

View File

@ -57,7 +57,7 @@ async fn index(
context.insert("boatdamages", &boatdamages); context.insert("boatdamages", &boatdamages);
context.insert("boats", &boats); context.insert("boats", &boats);
context.insert("loggedin_user", &user); context.insert("loggedin_user", &user.user);
Template::render("boatdamages", context.into_json()) Template::render("boatdamages", context.into_json())
} }

View File

@ -76,7 +76,7 @@ async fn index(
context.insert("coxes", &coxes); context.insert("coxes", &coxes);
context.insert("users", &users); context.insert("users", &users);
context.insert("logtypes", &logtypes); context.insert("logtypes", &logtypes);
context.insert("loggedin_user", &user); context.insert("loggedin_user", &user.user);
context.insert("on_water", &on_water); context.insert("on_water", &on_water);
context.insert("distances", &distances); context.insert("distances", &distances);
@ -87,7 +87,7 @@ async fn index(
async fn show(db: &State<SqlitePool>, user: NonGuestUser) -> Template { async fn show(db: &State<SqlitePool>, user: NonGuestUser) -> Template {
let logs = Logbook::completed(db).await; let logs = Logbook::completed(db).await;
Template::render("log.completed", context!(logs, loggedin_user: &user)) Template::render("log.completed", context!(logs, loggedin_user: &user.user))
} }
#[get("/show")] #[get("/show")]

View File

@ -17,7 +17,7 @@ async fn index(db: &State<SqlitePool>, user: NonGuestUser) -> Template {
Template::render( Template::render(
"stat", "stat",
context!(loggedin_user: &user, stat, personal, kiosk), context!(loggedin_user: &user.user, stat, personal, kiosk),
) )
} }