mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-23 05:49:22 +00:00
Fix error
This commit is contained in:
parent
f219b0f4fa
commit
7add678815
@ -341,7 +341,7 @@ pub fn get_membership(r: &mut HttpRequestHandler) -> RequestResult {
|
|||||||
|
|
||||||
/// Delete the membership of a user over a group
|
/// Delete the membership of a user over a group
|
||||||
pub fn remove_membership(r: &mut HttpRequestHandler) -> RequestResult {
|
pub fn remove_membership(r: &mut HttpRequestHandler) -> RequestResult {
|
||||||
let group_id = r.post_group_id_with_access("groupID", GroupAccessLevel::LIMITED_ACCESS)?;
|
let group_id = r.post_group_id_with_access("id", GroupAccessLevel::LIMITED_ACCESS)?;
|
||||||
|
|
||||||
if groups_helper::is_last_admin(&group_id, &r.user_id()?)? {
|
if groups_helper::is_last_admin(&group_id, &r.user_id()?)? {
|
||||||
r.forbidden("You are the last administrator of this group!".to_string())?;
|
r.forbidden("You are the last administrator of this group!".to_string())?;
|
||||||
|
Loading…
Reference in New Issue
Block a user