diff --git a/backend/feature/post/src/framework/web/post_web_routes.rs b/backend/feature/post/src/framework/web/post_web_routes.rs index 4f099dc..b403829 100644 --- a/backend/feature/post/src/framework/web/post_web_routes.rs +++ b/backend/feature/post/src/framework/web/post_web_routes.rs @@ -8,11 +8,14 @@ use crate::{ }; pub fn configure_post_routes(cfg: &mut web::ServiceConfig) { - cfg.service(web::resource("/post_info").route(web::get().to(get_all_post_info))); - cfg.service(web::resource("/post/{id}").route(web::get().to(get_full_post))); + cfg.service( + web::scope("/post") + .route("/all", web::get().to(get_all_post_info_handler)) + .route("/{id}", web::get().to(get_full_post_handler)), + ); } -async fn get_all_post_info( +async fn get_all_post_info_handler( post_controller: web::Data>, query: web::Query, ) -> impl Responder { @@ -28,7 +31,7 @@ async fn get_all_post_info( } } -async fn get_full_post( +async fn get_full_post_handler( post_controller: web::Data>, path: web::Path, ) -> impl Responder {