mirror of
https://github.com/nextcloud/server.git
synced 2026-06-19 21:49:43 -04:00
Merge pull request #17859 from nextcloud/bugfix/app-init
Fix app class setup warnings
This commit is contained in:
commit
323c76cd48
2 changed files with 44 additions and 49 deletions
|
|
@ -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'
|
||||
],
|
||||
'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' => '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',
|
||||
],
|
||||
[
|
||||
'name' => 'OCSAuthAPI#requestSharedSecret',
|
||||
'root' => '/cloud',
|
||||
'url' => '/shared-secret',
|
||||
'verb' => 'POST',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class App {
|
|||
}
|
||||
}
|
||||
|
||||
if (!$setUpViaQuery) {
|
||||
if (!$setUpViaQuery && $applicationClassName !== \OCP\AppFramework\App::class) {
|
||||
\OC::$server->getLogger()->logException($e, [
|
||||
'app' => $appName,
|
||||
]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue