diff options
author | Christopher Ng <chrng8@gmail.com> | 2023-07-31 12:10:50 -0700 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2023-08-08 16:29:12 -0700 |
commit | ab357bfe209473ec5faee3e2cece55f64e2578ae (patch) | |
tree | 98bcc1db632c25b1b92e14235305d5be963a9deb /apps/files_reminders/lib/Service/ReminderService.php | |
parent | fb71f8cec51ee004bc340517297e4df82a35d726 (diff) | |
download | nextcloud-server-ab357bfe209473ec5faee3e2cece55f64e2578ae.tar.gz nextcloud-server-ab357bfe209473ec5faee3e2cece55f64e2578ae.zip |
feat(files_reminders): add remove endpoint
Signed-off-by: Christopher Ng <chrng8@gmail.com>
(cherry picked from commit 777a791e72b9e8982228ff5a39cd61b7f051d8e4)
Diffstat (limited to 'apps/files_reminders/lib/Service/ReminderService.php')
-rw-r--r-- | apps/files_reminders/lib/Service/ReminderService.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_reminders/lib/Service/ReminderService.php b/apps/files_reminders/lib/Service/ReminderService.php index 0142802f3f1..bf4cd5da14d 100644 --- a/apps/files_reminders/lib/Service/ReminderService.php +++ b/apps/files_reminders/lib/Service/ReminderService.php @@ -99,6 +99,14 @@ class ReminderService { /** * @throws DoesNotExistException + */ + public function remove(IUser $user, int $fileId): void { + $reminder = $this->reminderMapper->findDueForUser($user, $fileId); + $this->reminderMapper->delete($reminder); + } + + /** + * @throws DoesNotExistException * @throws UserNotFoundException */ public function send(Reminder $reminder): void { |