mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 13:59:29 +00:00
Can check through the API the validity of a domain.
This commit is contained in:
parent
86cdc3d9a8
commit
b5e4e52272
@ -187,6 +187,27 @@ class GroupsController {
|
||||
return array("success" => "Group settings have been successfully updated!");
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the availability of a virtual directory
|
||||
*
|
||||
* @url POST /groups/checkVirtualDirectory
|
||||
*/
|
||||
public function checkVirtualDirectory() : array {
|
||||
|
||||
//Get the ID of the group to check
|
||||
$groupID = getPostGroupIdWithAccess("groupID", GroupMember::ADMINISTRATOR);
|
||||
|
||||
//Get post virtual directory
|
||||
$virtualDirectory = getPostVirtualDirectory("directory");
|
||||
|
||||
//Check virtual directory availability
|
||||
if(!checkVirtualDirectoryAvailability($virtualDirectory, $groupID, TRUE))
|
||||
Rest_fatal_error(401, "The virtual directory seems not to be available!");
|
||||
|
||||
//The directory is available
|
||||
return array("success" => "The directory is available!");
|
||||
}
|
||||
|
||||
/**
|
||||
* Change (update) the logo of the group
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user