diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-09-15 15:51:54 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-09-15 15:51:54 +0200 |
commit | 754850f4732845b752e9b2177b78a2bdbc8ae368 (patch) | |
tree | 23f645fadef7653bdb555620bebf9fb0e035c5f5 /apps/files_sharing/api | |
parent | aa8b1b2894637f3e2692e4d0f189c07dcb150e63 (diff) | |
download | nextcloud-server-754850f4732845b752e9b2177b78a2bdbc8ae368.tar.gz nextcloud-server-754850f4732845b752e9b2177b78a2bdbc8ae368.zip |
Fix status code
Diffstat (limited to 'apps/files_sharing/api')
-rw-r--r-- | apps/files_sharing/api/sharees.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_sharing/api/sharees.php b/apps/files_sharing/api/sharees.php index f3c91c18dc9..9e324078dad 100644 --- a/apps/files_sharing/api/sharees.php +++ b/apps/files_sharing/api/sharees.php @@ -20,6 +20,7 @@ */ namespace OCA\Files_Sharing\API; +use OCP\AppFramework\Http; use OCP\Contacts\IManager; use OCP\IGroup; use OCP\IGroupManager; @@ -295,10 +296,10 @@ class Sharees { $perPage = isset($_GET['perPage']) ? (int) $_GET['perPage'] : 200; if ($perPage <= 0) { - return new \OC_OCS_Result(null, 401, 'Invalid perPage argument'); + return new \OC_OCS_Result(null, Http::STATUS_BAD_REQUEST, 'Invalid perPage argument'); } if ($page <= 0) { - return new \OC_OCS_Result(null, 402, 'Invalid page'); + return new \OC_OCS_Result(null, Http::STATUS_BAD_REQUEST, 'Invalid page'); } $shareTypes = [ @@ -355,7 +356,7 @@ class Sharees { protected function searchSharees($search, $itemType, array $shareTypes, $page, $perPage) { // Verify arguments if ($itemType === null) { - return new \OC_OCS_Result(null, 400, 'Missing itemType'); + return new \OC_OCS_Result(null, Http::STATUS_BAD_REQUEST, 'Missing itemType'); } // Get users |