diff options
-rw-r--r-- | apps/files_sharing/lib/api.php | 7 |
1 files 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); } + } /** |