From a7139e4258c91d2290fd0a967857f9b680762625 Mon Sep 17 00:00:00 2001 From: nathaelbonnal Date: Mon, 11 Nov 2024 16:25:58 +0100 Subject: [PATCH] feat: Add get_companies and get_company API endpoints Signed-off-by: nathaelbonnal --- src/lib/application/http.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/application/http.rs b/src/lib/application/http.rs index 3ca4bf5..5572d39 100644 --- a/src/lib/application/http.rs +++ b/src/lib/application/http.rs @@ -7,7 +7,8 @@ use axum::{ Extension, }; use handlers::{ - attach_professional::attach_professional, create_company::create_company, health_check, + attach_professional::attach_professional, create_company::create_company, + get_companies::get_companies, get_company::get_company, health_check, }; use tokio::net; use tracing::{info, info_span}; @@ -87,7 +88,9 @@ where C: CompanyService + Send + Sync + 'static, { axum::Router::new() + .route("/companies", get(get_companies::)) .route("/companies", post(create_company::)) + .route("/companies/:company_id", get(get_company::)) .route( "/companies/:company_id/professionals", post(attach_professional::),