diff --git a/src/main.rs b/src/main.rs index f82b62c..b564e67 100644 --- a/src/main.rs +++ b/src/main.rs @@ -125,7 +125,8 @@ async fn main() -> std::io::Result<()> { web::scope("/view") .service( 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( web::scope("/profile") diff --git a/src/views.rs b/src/views.rs index 5f84102..0a7ba8d 100644 --- a/src/views.rs +++ b/src/views.rs @@ -88,6 +88,13 @@ pub(crate) async fn index_users( Ok(redirect_builder("/admin/login/")) } } +pub(crate) async fn view_link_fhs( + tera: web::Data, + id: Identity, +) -> Result { + view_link(tera, id, web::Path::from("".to_owned())).await +} + pub(crate) async fn view_link( tera: web::Data, id: Identity,