feat: user routing

feat:  contact
This commit is contained in:
Ahmet Kaan GÜMÜŞ 2024-12-14 03:11:39 +03:00
parent d0187b1b42
commit aa679b5a05
18 changed files with 304 additions and 64 deletions

View file

@ -1,4 +1,5 @@
pub mod role;
pub mod user;
use axum::{extract::State, http::StatusCode, response::IntoResponse, routing::get, Router};
use tower_http::cors::CorsLayer;
@ -12,6 +13,10 @@ pub async fn route(State(app_state): State<AppState>) -> Router {
"/role",
role::route(axum::extract::State(app_state.clone())),
)
.nest(
"/user",
user::route(axum::extract::State(app_state.clone())),
)
.layer(CorsLayer::permissive())
.with_state(app_state)
}