mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-12-28 14:38:52 +00:00
Ready to implement conversation creation
This commit is contained in:
parent
8745f8363c
commit
314e584840
11
src/controllers/conversations_controller.rs
Normal file
11
src/controllers/conversations_controller.rs
Normal file
@ -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")
|
||||
}
|
@ -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;
|
@ -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> {
|
||||
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)),
|
||||
|
Loading…
Reference in New Issue
Block a user