diff options
author | Christopher Ng <chrng8@gmail.com> | 2023-07-31 12:10:50 -0700 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2023-08-03 15:30:11 -0700 |
commit | 9bd7ddd0747aa32a4741fe99e70f6b1ea20cb564 (patch) | |
tree | ae093ba45c408c9718db8c930e40eac1f1386c94 /apps/files_reminders/lib | |
parent | db7f5a29f36cddb793ee813d21ebdc717dfbb0ae (diff) | |
download | nextcloud-server-9bd7ddd0747aa32a4741fe99e70f6b1ea20cb564.tar.gz nextcloud-server-9bd7ddd0747aa32a4741fe99e70f6b1ea20cb564.zip |
enh: does not exist return null
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/files_reminders/lib')
-rw-r--r-- | apps/files_reminders/lib/Controller/ApiController.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_reminders/lib/Controller/ApiController.php b/apps/files_reminders/lib/Controller/ApiController.php index fc1b647148d..7f6e24debe2 100644 --- a/apps/files_reminders/lib/Controller/ApiController.php +++ b/apps/files_reminders/lib/Controller/ApiController.php @@ -68,7 +68,10 @@ class ApiController extends OCSController { ]; return new JSONResponse($reminderData, Http::STATUS_OK); } catch (DoesNotExistException $e) { - return new JSONResponse([], Http::STATUS_NOT_FOUND); + $reminderData = [ + 'dueDate' => null, + ]; + return new JSONResponse($reminderData, Http::STATUS_OK); } catch (Throwable $th) { $this->logger->error($th->getMessage(), ['exception' => $th]); return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR); |