Skip to content

Commit

Permalink
Check if filled instead of has to avoid error on the server
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyNadd committed Dec 14, 2024
1 parent 3ae3d5b commit c52e4c9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/Http/Controllers/ChatController.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ public function storeCapsule(Request $request, $chatId)
$message->media_url = $mediaName;

// Vérifier que la date d'ouverture est définie
if ($request->has('date_time')) {
$message->opening_date = $request->date_time;
}
$message->opening_date = $request->filled('date_time') ? $request->date_time : now("Europe/Paris");

$message->save();

Expand Down
Binary file added public/source/media/1734202486_test.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c52e4c9

Please sign in to comment.