diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-11-08 10:55:51 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-11-08 10:55:51 +0100 |
commit | 9e6494304aab08f5a38ccbf2f2a3884b8ec6f25d (patch) | |
tree | e9c7b13c4ae86c9e672300b9408376ee5accbbb6 /apps/federation/appinfo | |
parent | 9fe4b953e98a067b77ccf10f848b97724ac82c0a (diff) | |
download | nextcloud-server-9e6494304aab08f5a38ccbf2f2a3884b8ec6f25d.tar.gz nextcloud-server-9e6494304aab08f5a38ccbf2f2a3884b8ec6f25d.zip |
Return routes array for federation app
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/federation/appinfo')
-rw-r--r-- | apps/federation/appinfo/routes.php | 91 |
1 files changed, 43 insertions, 48 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', ], - ] -); + ], +]; |