Browse Source

Move /config over to Core OCSController

tags/v11.0RC2
Roeland Jago Douma 7 years ago
parent
commit
6bc1c6590c
No account linked to committer's email address
3 changed files with 18 additions and 8 deletions
  1. 17
    0
      core/Controller/OCSController.php
  2. 1
    0
      core/routes.php
  3. 0
    8
      ocs/routes.php

+ 17
- 0
core/Controller/OCSController.php 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

+ 1
- 0
core/routes.php 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'],
],
]);


+ 0
- 8
ocs/routes.php 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',

Loading…
Cancel
Save