1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-26 07:19:22 +00:00

Ready to create new groups

This commit is contained in:
Pierre HUBERT 2020-06-23 19:04:32 +02:00
parent 04a0cd23dc
commit d38e2ee4ab
3 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,11 @@
//! # Groups controller
//!
//! @author Pierre Hubert
use crate::controllers::routes::RequestResult;
use crate::data::http_request_handler::HttpRequestHandler;
/// Create a new group
pub fn create(r: &mut HttpRequestHandler) -> RequestResult {
r.success("implement me")
}

View File

@ -6,4 +6,5 @@ pub mod account_controller;
pub mod user_controller;
pub mod conversations_controller;
pub mod search_controller;
pub mod groups_controller;
pub mod virtual_directory_controller;

View File

@ -1,6 +1,6 @@
use std::error::Error;
use crate::controllers::{account_controller, conversations_controller, search_controller, server_controller, user_controller, virtual_directory_controller};
use crate::controllers::{account_controller, conversations_controller, search_controller, server_controller, user_controller, virtual_directory_controller, groups_controller};
use crate::controllers::routes::Method::{GET, POST};
use crate::data::http_request_handler::HttpRequestHandler;
@ -127,6 +127,10 @@ pub fn get_routes() -> Vec<Route> {
Route::post("/search/global", Box::new(search_controller::search_global)),
// Groups controller
Route::post("/groups/create", Box::new(groups_controller::create)),
// Virtual directory controller
Route::post("/user/findbyfolder", Box::new(virtual_directory_controller::find_user)),