Can check through the API the validity of a domain.

This commit is contained in:
Pierre HUBERT 2018-07-14 11:42:54 +02:00
parent 86cdc3d9a8
commit b5e4e52272

View File

@ -187,6 +187,27 @@ class GroupsController {
return array("success" => "Group settings have been successfully updated!"); 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 * Change (update) the logo of the group
* *