Skip to content

Commit

Permalink
fix: allow update event as long it's today
Browse files Browse the repository at this point in the history
  • Loading branch information
blt950 committed Aug 3, 2024
1 parent d7a30e9 commit 400d24a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/API/EventController.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function update(Request $request, Event $event)
'title' => 'required|string|max:255',
'short_description' => 'required|max:280',
'long_description' => 'required',
'start_date' => 'required|date_format:Y-m-d H:i|after_or_equal:' . Carbon::parse($event->start_date)->format('Y-m-d H:i'),
'start_date' => 'required|date_format:Y-m-d H:i|after_or_equal:today',
'end_date' => 'required|date_format:Y-m-d H:i|after_or_equal:start_date',
'event_type' => 'integer',
'recurrence_interval' => 'nullable|integer',
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/EventController.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function update(Request $request, Event $event)
'title' => 'required|string|max:255',
'short_description' => 'required|max:280',
'long_description' => 'required',
'start_date' => 'required|date_format:Y-m-d H:i|after_or_equal:' . Carbon::parse($event->start_date)->format('Y-m-d H:i'),
'start_date' => 'required|date_format:Y-m-d H:i|after_or_equal:today',
'end_date' => 'required|date_format:Y-m-d H:i|after_or_equal:start_date',
'event_type' => 'integer',
'recurrence_interval' => 'nullable|integer',
Expand Down

0 comments on commit 400d24a

Please sign in to comment.