mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-06-19 08:35:18 +00:00
Can delete a group logo
This commit is contained in:
@ -171,6 +171,27 @@ class GroupsController {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a group logo
|
||||
*
|
||||
* @url POST /groups/delete_logo
|
||||
*/
|
||||
public function deleteLogo(){
|
||||
|
||||
//Get the ID of the group (with admin access)
|
||||
$groupID = $this->getPostGroupIDWithAdmin("id");
|
||||
|
||||
//Try to delete group logo
|
||||
if(!components()->groups->deleteLogo($groupID))
|
||||
Rest_fatal_error(500, "An error occurred while trying to delete group logo!");
|
||||
|
||||
//Success
|
||||
return array(
|
||||
"success" => "The group logo has been successfully deleted!",
|
||||
"url" => components()->groups->get_settings($groupID)->get_logo_url()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get and return a group ID specified in the POST request
|
||||
* in which the current user has admin rigths
|
||||
|
Reference in New Issue
Block a user