Move /config over to Core OCSController

This commit is contained in:
Roeland Jago Douma 2016-08-14 20:46:33 +02:00
parent 3e7710c0d8
commit 6bc1c6590c
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
3 changed files with 18 additions and 8 deletions

View File

@ -52,6 +52,23 @@ class OCSController extends \OCP\AppFramework\OCSController {
$this->userSession = $userSession;
}
/**
* @PublicPage
*
* @return DataResponse
*/
public function getConfig() {
$data = [
'version' => '1.7',
'website' => 'ownCloud',
'host' => $this->request->getServerHost(),
'contact' => '',
'ssl' => 'false',
];
return new DataResponse($data);
}
/**
* @NoAdminRequired
* @return DataResponse

View File

@ -56,6 +56,7 @@ $application->registerRoutes($this, [
'ocs' => [
['root' => '/cloud', 'name' => 'OCS#getCapabilities', 'url' => '/capabilities', 'verb' => 'GET'],
['root' => '/cloud', 'name' => 'OCS#getCurrentUser', 'url' => '/user', 'verb' => 'GET'],
['root' => '', 'name' => 'OCS#getConfig', 'url' => '/config', 'verb' => 'GET'],
],
]);

View File

@ -29,14 +29,6 @@
use OCP\API;
// Config
API::register(
'get',
'/config',
array('OC_OCS_Config', 'apiConfig'),
'core',
API::GUEST_AUTH
);
// Person
API::register(
'post',