From bdf07413d02a23aa460aa821191325b04561d597 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Mon, 31 Jul 2023 12:10:50 -0700 Subject: enh: return created status code Signed-off-by: Christopher Ng --- apps/files_reminders/lib/Controller/ApiController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apps/files_reminders/lib/Controller') diff --git a/apps/files_reminders/lib/Controller/ApiController.php b/apps/files_reminders/lib/Controller/ApiController.php index 30465f6a69b..fc1b647148d 100644 --- a/apps/files_reminders/lib/Controller/ApiController.php +++ b/apps/files_reminders/lib/Controller/ApiController.php @@ -94,7 +94,10 @@ class ApiController extends OCSController { } try { - $this->reminderService->createOrUpdate($user, $fileId, $dueDate); + $created = $this->reminderService->createOrUpdate($user, $fileId, $dueDate); + if ($created) { + return new JSONResponse([], Http::STATUS_CREATED); + } return new JSONResponse([], Http::STATUS_OK); } catch (NodeNotFoundException $e) { return new JSONResponse([], Http::STATUS_NOT_FOUND); -- cgit v1.2.3