1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-23 05:49:22 +00:00

Add route

This commit is contained in:
Pierre HUBERT 2020-06-29 09:10:57 +02:00
parent 330b18a365
commit bef9dfffbc
2 changed files with 9 additions and 0 deletions

View File

@ -11,6 +11,7 @@ use crate::api_data::res_change_group_logo::ResChangeGroupLogo;
use crate::api_data::res_create_group::GroupCreationResult; use crate::api_data::res_create_group::GroupCreationResult;
use crate::constants::{DEFAULT_GROUP_LOGO, PATH_GROUPS_LOGOS}; use crate::constants::{DEFAULT_GROUP_LOGO, PATH_GROUPS_LOGOS};
use crate::controllers::routes::RequestResult; use crate::controllers::routes::RequestResult;
use crate::data::error::ExecError;
use crate::data::group::{Group, GroupAccessLevel, GroupPostsCreationLevel, GroupRegistrationLevel, GroupVisibilityLevel}; use crate::data::group::{Group, GroupAccessLevel, GroupPostsCreationLevel, GroupRegistrationLevel, GroupVisibilityLevel};
use crate::data::group_id::GroupID; use crate::data::group_id::GroupID;
use crate::data::group_member::{GroupMember, GroupMembershipLevel}; use crate::data::group_member::{GroupMember, GroupMembershipLevel};
@ -363,3 +364,9 @@ pub fn set_following(r: &mut HttpRequestHandler) -> RequestResult {
r.success("Following status updated.") r.success("Following status updated.")
} }
/// Delete a group
pub fn delete_group(r: &mut HttpRequestHandler) -> RequestResult {
// TODO : implement groups deletion
r.internal_error(ExecError::boxed_new("Method not implemented yet"))
}

View File

@ -172,6 +172,8 @@ pub fn get_routes() -> Vec<Route> {
Route::post("/groups/set_following", Box::new(groups_controller::set_following)), Route::post("/groups/set_following", Box::new(groups_controller::set_following)),
Route::post("/groups/delete", Box::new(groups_controller::delete_group)),
// Virtual directory controller // Virtual directory controller
Route::post("/user/findbyfolder", Box::new(virtual_directory_controller::find_user)), Route::post("/user/findbyfolder", Box::new(virtual_directory_controller::find_user)),