From e8cac82b4f94a12cabce10af6b54e5fa1654111f Mon Sep 17 00:00:00 2001 From: Franz Dietrich Date: Thu, 15 Jun 2023 10:09:33 +0200 Subject: [PATCH] fix urls --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index c471e11..8366692 100644 --- a/src/main.rs +++ b/src/main.rs @@ -32,7 +32,7 @@ async fn main() { // build our application with some routes let app = Router::new() .nest_service("/static", ServeDir::new("static")) - .route("/greet/:name", get(greet)) + .route("/", get(register_form)) .route("/register/", post(register)) .with_state(db_pool); @@ -45,7 +45,7 @@ async fn main() { .unwrap(); } -async fn greet(extract::Path(name): extract::Path) -> impl IntoResponse { +async fn register_form(extract::Path(name): extract::Path) -> impl IntoResponse { let template = HelloTemplate { name }; HtmlTemplate(template) }