aboutsummaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api/lib/Middleware/ProvisioningApiMiddleware.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/provisioning_api/lib/Middleware/ProvisioningApiMiddleware.php')
-rw-r--r--apps/provisioning_api/lib/Middleware/ProvisioningApiMiddleware.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/provisioning_api/lib/Middleware/ProvisioningApiMiddleware.php b/apps/provisioning_api/lib/Middleware/ProvisioningApiMiddleware.php
index e5a93fc402a..a8bb8140060 100644
--- a/apps/provisioning_api/lib/Middleware/ProvisioningApiMiddleware.php
+++ b/apps/provisioning_api/lib/Middleware/ProvisioningApiMiddleware.php
@@ -33,6 +33,7 @@ use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Middleware;
use OCP\AppFramework\OCS\OCSException;
+use OCP\AppFramework\OCSController;
use OCP\AppFramework\Utility\IControllerMethodReflector;
class ProvisioningApiMiddleware extends Middleware {
@@ -83,7 +84,7 @@ class ProvisioningApiMiddleware extends Middleware {
*/
public function afterException($controller, $methodName, \Exception $exception) {
if ($exception instanceof NotSubAdminException) {
- throw new OCSException($exception->getMessage(), \OCP\API::RESPOND_UNAUTHORISED);
+ throw new OCSException($exception->getMessage(), OCSController::RESPOND_UNAUTHORISED);
}
throw $exception;