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 | bdf07413d02a23aa460aa821191325b04561d597 (patch) | |
tree | db8b87c3a9d272b688969f516fac4552d566764c /apps/files_reminders/lib/Controller | |
parent | d31302e72c8c6ec4281453e245b2e4a367b1c603 (diff) | |
download | nextcloud-server-bdf07413d02a23aa460aa821191325b04561d597.tar.gz nextcloud-server-bdf07413d02a23aa460aa821191325b04561d597.zip |
enh: return created status code
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/files_reminders/lib/Controller')
-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 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); |