Fix empty code for fhs.li

This commit is contained in:
Dietrich 2021-02-09 14:41:29 +01:00
parent a0a1065295
commit 32a2151ba0
Signed by: dietrich
GPG Key ID: 9F3C20C0F85DF67C
2 changed files with 9 additions and 1 deletions

View File

@ -125,7 +125,8 @@ async fn main() -> std::io::Result<()> {
web::scope("/view") web::scope("/view")
.service( .service(
web::scope("/link") web::scope("/link")
.route("/{redirect_id}", web::get().to(views::view_link)), .route("/{redirect_id}", web::get().to(views::view_link))
.route("/", web::get().to(views::view_link_fhs)),
) )
.service( .service(
web::scope("/profile") web::scope("/profile")

View File

@ -88,6 +88,13 @@ pub(crate) async fn index_users(
Ok(redirect_builder("/admin/login/")) Ok(redirect_builder("/admin/login/"))
} }
} }
pub(crate) async fn view_link_fhs(
tera: web::Data<Tera>,
id: Identity,
) -> Result<HttpResponse, ServerError> {
view_link(tera, id, web::Path::from("".to_owned())).await
}
pub(crate) async fn view_link( pub(crate) async fn view_link(
tera: web::Data<Tera>, tera: web::Data<Tera>,
id: Identity, id: Identity,