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 | 887058591cd6e34d99fd08616dd35b284f3ec9df (patch) | |
tree | 56be3109e37f9e43149439c0f4199f9907185c31 /apps/files_reminders/lib/Controller | |
parent | 5ff178a753c335d2ab6d10cee531490f1026ec42 (diff) | |
download | nextcloud-server-887058591cd6e34d99fd08616dd35b284f3ec9df.tar.gz nextcloud-server-887058591cd6e34d99fd08616dd35b284f3ec9df.zip |
feat(files_reminders): create or update
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_reminders/lib/Controller/ApiController.php b/apps/files_reminders/lib/Controller/ApiController.php index 10a6654d671..de69997f616 100644 --- a/apps/files_reminders/lib/Controller/ApiController.php +++ b/apps/files_reminders/lib/Controller/ApiController.php @@ -83,7 +83,7 @@ class ApiController extends OCSController { * * @param string $dueDate ISO 8601 formatted date time string */ - public function create(int $fileId, string $dueDate): JSONResponse { + public function set(int $fileId, string $dueDate): JSONResponse { try { $dueDate = (new DateTime($dueDate))->setTimezone(new DateTimeZone('UTC')); } catch (Exception $e) { @@ -97,7 +97,7 @@ class ApiController extends OCSController { } try { - $this->reminderService->create($user, $fileId, $dueDate); + $this->reminderService->createOrUpdate($user, $fileId, $dueDate); return new JSONResponse([], Http::STATUS_OK); } catch (Throwable $th) { $this->logger->error($th->getMessage(), ['exception' => $th]); |