We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d9d612 commit fee82adCopy full SHA for fee82ad
apps/files_reminders/lib/Controller/ApiController.php
@@ -82,6 +82,10 @@ public function get(int $fileId): DataResponse {
82
public function set(int $fileId, string $dueDate): DataResponse {
83
try {
84
$dueDate = (new DateTime($dueDate))->setTimezone(new DateTimeZone('UTC'));
85
+ $nowDate = (new DateTime('now'))->setTimezone(new DateTimeZone('UTC'));
86
+ if ($dueDate <= $nowDate) {
87
+ return new DataResponse([], Http::STATUS_BAD_REQUEST);
88
+ }
89
} catch (Exception $e) {
90
$this->logger->error($e->getMessage(), ['exception' => $e]);
91
return new DataResponse([], Http::STATUS_BAD_REQUEST);
0 commit comments