diff --git a/src/controllers/conversations_controller.rs b/src/controllers/conversations_controller.rs new file mode 100644 index 0000000..fbcc75a --- /dev/null +++ b/src/controllers/conversations_controller.rs @@ -0,0 +1,11 @@ +//! # Conversations controller +//! +//! @author Pierre Hubert + +use crate::data::http_request_handler::HttpRequestHandler; +use crate::controllers::routes::RequestResult; + +/// Create a new conversation +pub fn create(r: &mut HttpRequestHandler) -> RequestResult { + r.success("create") +} \ No newline at end of file diff --git a/src/controllers/mod.rs b/src/controllers/mod.rs index d78da64..336114f 100644 --- a/src/controllers/mod.rs +++ b/src/controllers/mod.rs @@ -4,4 +4,5 @@ pub mod server; pub mod server_controller; pub mod account_controller; pub mod user_controller; +pub mod conversations_controller; pub mod virtual_directory_controller; \ No newline at end of file diff --git a/src/controllers/routes.rs b/src/controllers/routes.rs index dea9e10..1362689 100644 --- a/src/controllers/routes.rs +++ b/src/controllers/routes.rs @@ -1,7 +1,7 @@ use std::error::Error; use crate::controllers::routes::Method::{GET, POST}; -use crate::controllers::{server_controller, account_controller, user_controller, virtual_directory_controller}; +use crate::controllers::{server_controller, account_controller, user_controller, virtual_directory_controller, conversations_controller}; use crate::data::http_request_handler::HttpRequestHandler; /// Project routes @@ -88,6 +88,9 @@ pub fn get_routes() -> Vec { Route::post_without_login("/user/getAdvancedUserInfo", Box::new(user_controller::get_advanced_info)), Route::post_without_login("/user/getAdvancedUserInfos", Box::new(user_controller::get_advanced_info)), + // Conversations controller + Route::post("/conversations/create", Box::new(conversations_controller::create)), + // Virtual directory controller Route::post("/user/findbyfolder", Box::new(virtual_directory_controller::find_user)),