diff options
-rw-r--r-- | apps/federation/appinfo/routes.php | 91 | ||||
-rw-r--r-- | lib/public/AppFramework/App.php | 2 |
2 files changed, 44 insertions, 49 deletions
diff --git a/apps/federation/appinfo/routes.php b/apps/federation/appinfo/routes.php index 065be94f36b..3d8e25ba1de 100644 --- a/apps/federation/appinfo/routes.php +++ b/apps/federation/appinfo/routes.php @@ -22,53 +22,48 @@ * */ -$application = new \OCA\Federation\AppInfo\Application(); - -$application->registerRoutes( - $this, - [ - 'routes' => [ - [ - 'name' => 'Settings#addServer', - 'url' => '/trusted-servers', - 'verb' => 'POST' - ], - [ - 'name' => 'Settings#removeServer', - 'url' => '/trusted-servers/{id}', - 'verb' => 'DELETE' - ], - [ - 'name' => 'Settings#autoAddServers', - 'url' => '/auto-add-servers', - 'verb' => 'POST' - ], +return [ + 'routes' => [ + [ + 'name' => 'Settings#addServer', + 'url' => '/trusted-servers', + 'verb' => 'POST' + ], + [ + 'name' => 'Settings#removeServer', + 'url' => '/trusted-servers/{id}', + 'verb' => 'DELETE' + ], + [ + 'name' => 'Settings#autoAddServers', + 'url' => '/auto-add-servers', + 'verb' => 'POST' + ], + ], + 'ocs' => [ + // old endpoints, only used by Nextcloud and ownCloud + [ + 'name' => 'OCSAuthAPI#getSharedSecretLegacy', + 'url' => '/api/v1/shared-secret', + 'verb' => 'GET', + ], + [ + 'name' => 'OCSAuthAPI#requestSharedSecretLegacy', + 'url' => '/api/v1/request-shared-secret', + 'verb' => 'POST', + ], + // new endpoints, published as public api + [ + 'name' => 'OCSAuthAPI#getSharedSecret', + 'root' => '/cloud', + 'url' => '/shared-secret', + 'verb' => 'GET', ], - 'ocs' => [ - // old endpoints, only used by Nextcloud and ownCloud - [ - 'name' => 'OCSAuthAPI#getSharedSecretLegacy', - 'url' => '/api/v1/shared-secret', - 'verb' => 'GET', - ], - [ - 'name' => 'OCSAuthAPI#requestSharedSecretLegacy', - 'url' => '/api/v1/request-shared-secret', - 'verb' => 'POST', - ], - // new endpoints, published as public api - [ - 'name' => 'OCSAuthAPI#getSharedSecret', - 'root' => '/cloud', - 'url' => '/shared-secret', - 'verb' => 'GET', - ], - [ - 'name' => 'OCSAuthAPI#requestSharedSecret', - 'root' => '/cloud', - 'url' => '/shared-secret', - 'verb' => 'POST', - ], + [ + 'name' => 'OCSAuthAPI#requestSharedSecret', + 'root' => '/cloud', + 'url' => '/shared-secret', + 'verb' => 'POST', ], - ] -); + ], +]; diff --git a/lib/public/AppFramework/App.php b/lib/public/AppFramework/App.php index fd91d8d058d..f327e6ca022 100644 --- a/lib/public/AppFramework/App.php +++ b/lib/public/AppFramework/App.php @@ -95,7 +95,7 @@ class App { } } - if (!$setUpViaQuery) { + if (!$setUpViaQuery && $applicationClassName !== \OCP\AppFramework\App::class) { \OC::$server->getLogger()->logException($e, [ 'app' => $appName, ]); |