feat: interaction routing

This commit is contained in:
Ahmet Kaan GÜMÜŞ 2024-12-15 21:07:58 +03:00
parent 0d9cef79f3
commit 0f09dd6a82
4 changed files with 154 additions and 3 deletions

View file

@ -1,4 +1,5 @@
pub mod comment;
pub mod interaction;
pub mod post;
pub mod role;
pub mod user;
@ -27,6 +28,10 @@ pub async fn route(State(app_state): State<AppState>) -> Router {
"/comments",
comment::route(axum::extract::State(app_state.clone())),
)
.nest(
"/interactions",
interaction::route(axum::extract::State(app_state.clone())),
)
.layer(CorsLayer::permissive())
.with_state(app_state)
}