]> source.dussan.org Git - nextcloud-server.git/commitdiff
enh: does not exist return null
authorChristopher Ng <chrng8@gmail.com>
Mon, 31 Jul 2023 19:10:50 +0000 (12:10 -0700)
committerChristopher Ng <chrng8@gmail.com>
Thu, 3 Aug 2023 22:30:11 +0000 (15:30 -0700)
Signed-off-by: Christopher Ng <chrng8@gmail.com>
apps/files_reminders/lib/Controller/ApiController.php

index fc1b647148daf7e517b4d468358188c0f59425f0..7f6e24debe25699fc448f0d5623d208dceab7618 100644 (file)
@@ -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);