From: Christopher Ng Date: Mon, 31 Jul 2023 19:10:50 +0000 (-0700) Subject: enh: does not exist return null X-Git-Tag: v28.0.0beta1~601^2~15 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9bd7ddd0747aa32a4741fe99e70f6b1ea20cb564;p=nextcloud-server.git enh: does not exist return null Signed-off-by: Christopher Ng --- 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);