aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Remote/Api/OCS.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Remote/Api/OCS.php')
-rw-r--r--lib/private/Remote/Api/OCS.php30
1 files changed, 6 insertions, 24 deletions
diff --git a/lib/private/Remote/Api/OCS.php b/lib/private/Remote/Api/OCS.php
index 770dce3545f..36bc22751a5 100644
--- a/lib/private/Remote/Api/OCS.php
+++ b/lib/private/Remote/Api/OCS.php
@@ -1,33 +1,15 @@
<?php
+
/**
- * @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Robin Appelman <robin@icewind.nl>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OC\Remote\Api;
use GuzzleHttp\Exception\ClientException;
use OC\ForbiddenException;
use OC\Remote\User;
-use OCP\API;
+use OCP\AppFramework\OCSController;
use OCP\Remote\Api\ICapabilitiesApi;
use OCP\Remote\Api\IUserApi;
@@ -58,10 +40,10 @@ class OCS extends ApiBase implements ICapabilitiesApi, IUserApi {
if (!isset($response['ocs']) || !isset($response['ocs']['meta'])) {
throw new \Exception('Invalid ocs response');
}
- if ($response['ocs']['meta']['statuscode'] === API::RESPOND_UNAUTHORISED) {
+ if ($response['ocs']['meta']['statuscode'] === OCSController::RESPOND_UNAUTHORISED) {
throw new ForbiddenException();
}
- if ($response['ocs']['meta']['statuscode'] === API::RESPOND_NOT_FOUND) {
+ if ($response['ocs']['meta']['statuscode'] === OCSController::RESPOND_NOT_FOUND) {
throw new NotFoundException();
}
if ($response['ocs']['meta']['status'] !== 'ok') {