diff --git a/src/tera/boatdamage.rs b/src/tera/boatdamage.rs index ab6eed8..696c320 100644 --- a/src/tera/boatdamage.rs +++ b/src/tera/boatdamage.rs @@ -57,7 +57,7 @@ async fn index( context.insert("boatdamages", &boatdamages); context.insert("boats", &boats); - context.insert("loggedin_user", &user); + context.insert("loggedin_user", &user.user); Template::render("boatdamages", context.into_json()) } diff --git a/src/tera/log.rs b/src/tera/log.rs index e4b225a..e6b35ec 100644 --- a/src/tera/log.rs +++ b/src/tera/log.rs @@ -76,7 +76,7 @@ async fn index( context.insert("coxes", &coxes); context.insert("users", &users); context.insert("logtypes", &logtypes); - context.insert("loggedin_user", &user); + context.insert("loggedin_user", &user.user); context.insert("on_water", &on_water); context.insert("distances", &distances); @@ -87,7 +87,7 @@ async fn index( async fn show(db: &State, user: NonGuestUser) -> Template { 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")] diff --git a/src/tera/stat.rs b/src/tera/stat.rs index 3927d8a..86449a3 100644 --- a/src/tera/stat.rs +++ b/src/tera/stat.rs @@ -17,7 +17,7 @@ async fn index(db: &State, user: NonGuestUser) -> Template { Template::render( "stat", - context!(loggedin_user: &user, stat, personal, kiosk), + context!(loggedin_user: &user.user, stat, personal, kiosk), ) }