From 9bd7ddd0747aa32a4741fe99e70f6b1ea20cb564 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Mon, 31 Jul 2023 12:10:50 -0700 Subject: [PATCH] enh: does not exist return null Signed-off-by: Christopher Ng --- apps/files_reminders/lib/Controller/ApiController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.39.5