]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make sure the cloud_federation_api routes are loaded
authorJoas Schilling <coding@schilljs.com>
Fri, 17 Apr 2020 09:19:49 +0000 (11:19 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Sat, 18 Apr 2020 09:21:28 +0000 (11:21 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
ocm-provider/index.php

index e1aa7f2b03bb5148778f3ef173f996f47db34ca1..1b90fd5366560c76b7b610a6fcee8cecc7582680 100644 (file)
@@ -29,6 +29,8 @@ $server = \OC::$server;
 $isEnabled = $server->getAppManager()->isEnabledForUser('cloud_federation_api');
 
 if ($isEnabled) {
+       // Make sure the routes are loaded
+       \OC_App::loadApp('cloud_federation_api');
        $capabilities = new OCA\CloudFederationAPI\Capabilities($server->getURLGenerator());
        header('Content-Type: application/json');
        echo json_encode($capabilities->getCapabilities()['ocm']);