1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-26 15:29:21 +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::constants::{DEFAULT_GROUP_LOGO, PATH_GROUPS_LOGOS};
use crate::controllers::routes::RequestResult;
use crate::data::error::ExecError;
use crate::data::group::{Group, GroupAccessLevel, GroupPostsCreationLevel, GroupRegistrationLevel, GroupVisibilityLevel};
use crate::data::group_id::GroupID;
use crate::data::group_member::{GroupMember, GroupMembershipLevel};
@ -362,4 +363,10 @@ pub fn set_following(r: &mut HttpRequestHandler) -> RequestResult {
groups_helper::set_following(&group_id, &r.user_id()?, following)?;
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/delete", Box::new(groups_controller::delete_group)),
// Virtual directory controller
Route::post("/user/findbyfolder", Box::new(virtual_directory_controller::find_user)),