implemented simple chat conversation creation endpoint
This commit is contained in:
@@ -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)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user