feat: role_permission routing

This commit is contained in:
Ahmet Kaan GÜMÜŞ 2024-12-16 02:57:51 +03:00
parent f1dce5a765
commit 64bf22ba68
3 changed files with 193 additions and 0 deletions

View file

@ -5,6 +5,7 @@ pub mod permission;
pub mod post;
pub mod post_interaction;
pub mod role;
pub mod role_permission;
pub mod user;
use axum::{extract::State, http::StatusCode, response::IntoResponse, routing::get, Router};
@ -43,6 +44,10 @@ pub async fn route(State(app_state): State<AppState>) -> Router {
"/comment_interactions",
comment_interaction::route(axum::extract::State(app_state.clone())),
)
.nest(
"/role_permissions",
role_permission::route(axum::extract::State(app_state.clone())),
)
.layer(CorsLayer::permissive())
.with_state(app_state)
}