add impressum
This commit is contained in:
@ -65,6 +65,17 @@ async fn index(db: &State<SqlitePool>, user: User, flash: Option<FlashMessage<'_
|
||||
Template::render("index", context.into_json())
|
||||
}
|
||||
|
||||
#[get("/impressum")]
|
||||
async fn impressum(db: &State<SqlitePool>, user: Option<User>) -> Template {
|
||||
let mut context = Context::new();
|
||||
|
||||
if let Some(user) = user {
|
||||
context.insert("loggedin_user", &UserWithDetails::from_user(user, db).await);
|
||||
}
|
||||
|
||||
Template::render("impressum", context.into_json())
|
||||
}
|
||||
|
||||
#[get("/steering")]
|
||||
async fn steering(db: &State<SqlitePool>, user: User, flash: Option<FlashMessage<'_>>) -> Template {
|
||||
let mut context = Context::new();
|
||||
@ -179,7 +190,7 @@ pub struct Config {
|
||||
|
||||
pub fn config(rocket: Rocket<Build>) -> Rocket<Build> {
|
||||
rocket
|
||||
.mount("/", routes![index, steering])
|
||||
.mount("/", routes![index, steering, impressum])
|
||||
.mount("/auth", auth::routes())
|
||||
.mount("/wikiauth", routes![wikiauth])
|
||||
.mount("/log", log::routes())
|
||||
|
Reference in New Issue
Block a user