summaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Middleware/OCSMiddleware.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-03-03 15:10:42 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2021-03-03 20:54:32 +0100
commitcc744740b790a72e2d5c6b07814dadb5b58014fb (patch)
tree3ce5db818feacccfecb81d98d7ecaa11b7e11336 /lib/private/AppFramework/Middleware/OCSMiddleware.php
parent0829fea5e7f9a81a69599c5df7c75b997055e5ba (diff)
downloadnextcloud-server-cc744740b790a72e2d5c6b07814dadb5b58014fb.tar.gz
nextcloud-server-cc744740b790a72e2d5c6b07814dadb5b58014fb.zip
Remove deprecated \OCP\API
Time to remove this forgood now. Remaining constant moved over The world is a tiny bit better Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/AppFramework/Middleware/OCSMiddleware.php')
-rw-r--r--lib/private/AppFramework/Middleware/OCSMiddleware.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/private/AppFramework/Middleware/OCSMiddleware.php b/lib/private/AppFramework/Middleware/OCSMiddleware.php
index 5016fc3eec8..f701f17a48e 100644
--- a/lib/private/AppFramework/Middleware/OCSMiddleware.php
+++ b/lib/private/AppFramework/Middleware/OCSMiddleware.php
@@ -29,7 +29,6 @@ use OC\AppFramework\Http;
use OC\AppFramework\OCS\BaseResponse;
use OC\AppFramework\OCS\V1Response;
use OC\AppFramework\OCS\V2Response;
-use OCP\API;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\JSONResponse;
@@ -80,7 +79,7 @@ class OCSMiddleware extends Middleware {
if ($controller instanceof OCSController && $exception instanceof OCSException) {
$code = $exception->getCode();
if ($code === 0) {
- $code = API::RESPOND_UNKNOWN_ERROR;
+ $code = \OCP\AppFramework\OCSController::RESPOND_UNKNOWN_ERROR;
}
return $this->buildNewResponse($controller, $code, $exception->getMessage());
@@ -109,7 +108,7 @@ class OCSMiddleware extends Middleware {
$message = $response->getData()['message'];
}
- return $this->buildNewResponse($controller, API::RESPOND_UNAUTHORISED, $message);
+ return $this->buildNewResponse($controller, OCSController::RESPOND_UNAUTHORISED, $message);
}
}