From e4810263e37095b73fd0d5e7571656c354c65ce2 Mon Sep 17 00:00:00 2001 From: Bat Date: Mon, 3 Sep 2018 22:48:35 +0100 Subject: [PATCH] Make about page accessible even when logged out --- src/routes/instance.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/instance.rs b/src/routes/instance.rs index 2d666084..cbf710ca 100644 --- a/src/routes/instance.rs +++ b/src/routes/instance.rs @@ -125,9 +125,9 @@ fn nodeinfo(conn: DbConn) -> Json { } #[get("/about")] -fn about(user: User, conn: DbConn) -> Template { +fn about(user: Option, conn: DbConn) -> Template { Template::render("instance/about", json!({ - "account": user.to_json(&*conn), + "account": user.map(|u| u.to_json(&*conn)), "instance": Instance::get_local(&*conn), "admin": Instance::get_local(&*conn).map(|i| i.main_admin(&*conn).to_json(&*conn)), "version": "0.1.0",