Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-07-22 13:48:22 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2017-07-24 14:43:00 +0300
commit10efec246de432e27a594d5b237bdef4d8e465eb (patch)
treebe81a405baa70fa65854bd6bffe520372f94e90b /apps/testing/appinfo
parentd1993c32e5ef84af2ac30b7b89a5b491e113f455 (diff)
Move over Config
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/testing/appinfo')
-rw-r--r--apps/testing/appinfo/routes.php36
1 files changed, 13 insertions, 23 deletions
diff --git a/apps/testing/appinfo/routes.php b/apps/testing/appinfo/routes.php
index d45cfe00eca..aa32e4583c9 100644
--- a/apps/testing/appinfo/routes.php
+++ b/apps/testing/appinfo/routes.php
@@ -22,16 +22,10 @@
namespace OCA\Testing\AppInfo;
-use OCA\Testing\Config;
use OCA\Testing\Locking\Provisioning;
use OCP\API;
use OCP\AppFramework\App;
-$config = new Config(
- \OC::$server->getConfig(),
- \OC::$server->getRequest()
-);
-
$app = new App('testing');
$app->registerRoutes(
$this,
@@ -47,26 +41,22 @@ $app->registerRoutes(
'url' => '/anonProtected',
'verb' => 'GET',
],
- ]
+ ],
+ 'ocs' => [
+ [
+ 'name' => 'Config#setAppValue',
+ 'url' => '/api/v1/app/{appid}/{configkey}',
+ 'verb' => 'POST',
+ ],
+ [
+ 'name' => 'Config#deleteAppValue',
+ 'url' => '/api/v1/app/{appid}/{configkey}',
+ 'verb' => 'DELETE',
+ ],
+ ],
]
);
-API::register(
- 'post',
- '/apps/testing/api/v1/app/{appid}/{configkey}',
- [$config, 'setAppValue'],
- 'testing',
- API::ADMIN_AUTH
-);
-
-API::register(
- 'delete',
- '/apps/testing/api/v1/app/{appid}/{configkey}',
- [$config, 'deleteAppValue'],
- 'testing',
- API::ADMIN_AUTH
-);
-
$locking = new Provisioning(
\OC::$server->getLockingProvider(),
\OC::$server->getDatabaseConnection(),