1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-22 21:39:21 +00:00

Ready to implement conversation creation

This commit is contained in:
Pierre HUBERT 2020-06-03 13:36:19 +02:00
parent 8745f8363c
commit 314e584840
3 changed files with 16 additions and 1 deletions

View 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")
}

View File

@ -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;

View File

@ -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)),