diff options
Diffstat (limited to 'ocs/v1.php')
-rw-r--r-- | ocs/v1.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ocs/v1.php b/ocs/v1.php index 1c7d1c89768..93d9c67b045 100644 --- a/ocs/v1.php +++ b/ocs/v1.php @@ -21,12 +21,18 @@ * */ -require_once('../lib/base.php'); +require_once '../lib/base.php'; + use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\Exception\MethodNotAllowedException; try { + // load all apps to get all api routes properly setup + OC_App::loadApps(); + + // match the request OC::getRouter()->match('/ocs'.OC_Request::getRawPathInfo()); + } catch (ResourceNotFoundException $e) { OC_OCS::notFound(); } catch (MethodNotAllowedException $e) { |