mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-27 15:59:29 +00:00
Removed duplicate
This commit is contained in:
parent
f526893786
commit
a90cde6268
@ -299,7 +299,7 @@ class GroupsController {
|
||||
Rest_fatal_error(401, "You did not send a membership request to this group!");
|
||||
|
||||
//Try to cancel membership request
|
||||
if(!components()->groups->cancelRequest(userID, $groupID))
|
||||
if(!components()->groups->deleteRequest(userID, $groupID))
|
||||
Rest_fatal_error(500, "An error occurred while trying to cancel membership request!");
|
||||
|
||||
return array("success" => "The request has been successfully cancelled!");
|
||||
|
@ -336,17 +336,6 @@ class GroupsComponent {
|
||||
return $this->deleteMembershipWithStatus($userID, $groupID, GroupMember::PENDING);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel a membership request
|
||||
*
|
||||
* @param int $userID The ID of the target user
|
||||
* @param int $groupID The ID of the related group
|
||||
* @return bool TRUE for a success / FALSE else
|
||||
*/
|
||||
public function cancelRequest(int $userID, int $groupID) : bool {
|
||||
return $this->deleteMembershipWithStatus($userID, $groupID, GroupMember::PENDING);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the membership level of a user to a group
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user