mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-12-28 14:38:52 +00:00
Ready to create new groups
This commit is contained in:
parent
04a0cd23dc
commit
d38e2ee4ab
11
src/controllers/groups_controller.rs
Normal file
11
src/controllers/groups_controller.rs
Normal 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")
|
||||
}
|
@ -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;
|
@ -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)),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user