From f8da2282f92ccd13ead9522ddc7d1bfaaf3e0fbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kayn=C3=A3=20de=20Camargo?= Date: Sun, 5 May 2024 13:42:01 -0300 Subject: [PATCH] Fix: Rename authenticate to authorize --- src/handlers/user.rs | 2 +- src/routes/user.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/user.rs b/src/handlers/user.rs index d5728d1..839b457 100644 --- a/src/handlers/user.rs +++ b/src/handlers/user.rs @@ -39,7 +39,7 @@ pub async fn get_one( } } -pub async fn authenticate( +pub async fn authorize( State(app_state): State>, Json(body): Json, ) -> Result { diff --git a/src/routes/user.rs b/src/routes/user.rs index b12bd1d..814ca78 100644 --- a/src/routes/user.rs +++ b/src/routes/user.rs @@ -11,6 +11,6 @@ pub fn create_routes(app_state: Arc) -> Router { Router::new() .route("/users/:id", get(user::get_one)) .route("/users", post(user::create)) - .route("/users/login", post(user::authenticate)) + .route("/users/login", post(user::authorize)) .with_state(app_state) }