Skip to content

Commit

Permalink
Fix: Rename authenticate to authorize
Browse files Browse the repository at this point in the history
  • Loading branch information
rhwddy committed May 5, 2024
1 parent 418120f commit f8da228
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/handlers/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub async fn get_one(
}
}

pub async fn authenticate(
pub async fn authorize(
State(app_state): State<Arc<AppState>>,
Json(body): Json<LoginUser>,
) -> Result<impl IntoResponse, impl IntoResponse> {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ pub fn create_routes(app_state: Arc<AppState>) -> 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)
}

0 comments on commit f8da228

Please sign in to comment.