Browse Source

fixup! Do not create Application instances directly

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tags/v18.0.0beta1
Roeland Jago Douma 4 years ago
parent
commit
12c13b86d8
No account linked to committer's email address
2 changed files with 37 additions and 45 deletions
  1. 34
    39
      apps/encryption/appinfo/routes.php
  2. 3
    6
      apps/files_trashbin/appinfo/routes.php

+ 34
- 39
apps/encryption/appinfo/routes.php View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
@@ -21,43 +22,37 @@
*
*/


namespace OCA\Encryption\AppInfo;

/** @var Application $app */
$app = \OC::$server->query(Application::class);
$app->registerRoutes($this, array('routes' => array(

[
'name' => 'Recovery#adminRecovery',
'url' => '/ajax/adminRecovery',
'verb' => 'POST'
],
[
'name' => 'Settings#updatePrivateKeyPassword',
'url' => '/ajax/updatePrivateKeyPassword',
'verb' => 'POST'
],
[
'name' => 'Settings#setEncryptHomeStorage',
'url' => '/ajax/setEncryptHomeStorage',
'verb' => 'POST'
],
[
'name' => 'Recovery#changeRecoveryPassword',
'url' => '/ajax/changeRecoveryPassword',
'verb' => 'POST'
],
[
'name' => 'Recovery#userSetRecovery',
'url' => '/ajax/userSetRecovery',
'verb' => 'POST'
],
[
'name' => 'Status#getStatus',
'url' => '/ajax/getStatus',
'verb' => 'GET'
return [
'routes' => [
[
'name' => 'Recovery#adminRecovery',
'url' => '/ajax/adminRecovery',
'verb' => 'POST'
],
[
'name' => 'Settings#updatePrivateKeyPassword',
'url' => '/ajax/updatePrivateKeyPassword',
'verb' => 'POST'
],
[
'name' => 'Settings#setEncryptHomeStorage',
'url' => '/ajax/setEncryptHomeStorage',
'verb' => 'POST'
],
[
'name' => 'Recovery#changeRecoveryPassword',
'url' => '/ajax/changeRecoveryPassword',
'verb' => 'POST'
],
[
'name' => 'Recovery#userSetRecovery',
'url' => '/ajax/userSetRecovery',
'verb' => 'POST'
],
[
'name' => 'Status#getStatus',
'url' => '/ajax/getStatus',
'verb' => 'GET'
],
]


)));
];

+ 3
- 6
apps/files_trashbin/appinfo/routes.php View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
* @copyright Copyright (c) 2016, Roeland Jago Douma <roeland@famdouma.nl>
@@ -22,11 +23,7 @@
*
*/

namespace OCA\Files_Trashbin\AppInfo;

/** @var Application $application */
$application = \OC::$server->query(Application::class);
$application->registerRoutes($this, [
return [
'routes' => [
[
'name' => 'Preview#getPreview',
@@ -34,4 +31,4 @@ $application->registerRoutes($this, [
'verb' => 'GET',
],
],
]);
];

Loading…
Cancel
Save