From 513dc20d4b851381a9096807a930fd7b371a553b Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 30 Sep 2013 13:05:34 +0200 Subject: [PATCH] also return success if no shares are found. --- apps/files_sharing/lib/api.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/files_sharing/lib/api.php b/apps/files_sharing/lib/api.php index 455784558b5..c3048da9a41 100644 --- a/apps/files_sharing/lib/api.php +++ b/apps/files_sharing/lib/api.php @@ -44,11 +44,12 @@ class Api { $share = \OCP\Share::getItemShared('file', null); - if ($share !== null) { - return new \OC_OCS_Result($share); + if ($share === false) { + return new \OC_OCS_Result(null, 404, 'could not get shares'); } else { - return new \OC_OCS_Result(null, 404, 'no shares available'); + return new \OC_OCS_Result($share); } + } /** -- 2.39.5