implemented simple chat conversation creation endpoint

This commit is contained in:
2025-09-25 06:55:47 +02:00
parent 7828d4f515
commit 213d696e93
9 changed files with 107 additions and 7 deletions

View File

@@ -6,26 +6,21 @@ use r2d2::{Pool};
use crate::rooms::routes::rooms_routes;
use crate::utils::routes::utils_routes;
use crate::chat::routes::chat_routes;
use crate::utils::db_pool::{AppState};
//TODO: add secret fomr dotenv here
/*
Function to build our main router
that regroup all feature centered router
*/
pub fn create_router(state: AppState) -> Router {
Router::new()
.nest("/auth", utils_routes().with_state(state.clone()))
.nest("/rooms", rooms_routes().with_state(state.clone()))
.nest("/chat", chat_routes().with_state(state.clone()))
.with_state(state)
}