feat: ✨ user routing
feat: ✨ contact
This commit is contained in:
parent
d0187b1b42
commit
aa679b5a05
18 changed files with 304 additions and 64 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue