mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-26 21:41:04 +00:00
Make about page accessible even when logged out
This commit is contained in:
parent
133356191a
commit
e4810263e3
1 changed files with 2 additions and 2 deletions
|
@ -125,9 +125,9 @@ fn nodeinfo(conn: DbConn) -> Json<serde_json::Value> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/about")]
|
#[get("/about")]
|
||||||
fn about(user: User, conn: DbConn) -> Template {
|
fn about(user: Option<User>, conn: DbConn) -> Template {
|
||||||
Template::render("instance/about", json!({
|
Template::render("instance/about", json!({
|
||||||
"account": user.to_json(&*conn),
|
"account": user.map(|u| u.to_json(&*conn)),
|
||||||
"instance": Instance::get_local(&*conn),
|
"instance": Instance::get_local(&*conn),
|
||||||
"admin": Instance::get_local(&*conn).map(|i| i.main_admin(&*conn).to_json(&*conn)),
|
"admin": Instance::get_local(&*conn).map(|i| i.main_admin(&*conn).to_json(&*conn)),
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
|
|
Loading…
Reference in a new issue