Merge pull request #24628 from nextcloud/bugfix/noid/ocs-endpoint-load-issues
Fix loading order for OCS endpoints
This commit is contained in:
commit
16be144aab
|
@ -51,13 +51,16 @@ use Symfony\Component\Routing\Exception\MethodNotAllowedException;
|
|||
try {
|
||||
OC_App::loadApps(['session']);
|
||||
OC_App::loadApps(['authentication']);
|
||||
|
||||
// load all apps to get all api routes properly setup
|
||||
// FIXME: this should ideally appear after handleLogin but will cause
|
||||
// side effects in existing apps
|
||||
OC_App::loadApps();
|
||||
|
||||
if (!\OC::$server->getUserSession()->isLoggedIn()) {
|
||||
OC::handleLogin(\OC::$server->getRequest());
|
||||
}
|
||||
|
||||
// load all apps to get all api routes properly setup
|
||||
OC_App::loadApps();
|
||||
|
||||
OC::$server->get(\OC\Route\Router::class)->match('/ocsapp'.\OC::$server->getRequest()->getRawPathInfo());
|
||||
} catch (ResourceNotFoundException $e) {
|
||||
OC_API::setContentType();
|
||||
|
|
Loading…
Reference in New Issue