Skip to content

Commit

Permalink
feat: Add get_companies and get_company API endpoints
Browse files Browse the repository at this point in the history
Signed-off-by: nathaelbonnal <pro.nathaelbonnal@gmail.com>
  • Loading branch information
NathaelB committed Nov 12, 2024
1 parent 171110e commit 8989ec2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/application/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -87,7 +88,9 @@ where
C: CompanyService + Send + Sync + 'static,
{
axum::Router::new()
.route("/companies", get(get_companies::<C>))
.route("/companies", post(create_company::<C>))
.route("/companies/:company_id", get(get_company::<C>))
.route(
"/companies/:company_id/professionals",
post(attach_professional::<C>),
Expand Down

0 comments on commit 8989ec2

Please # to comment.