Skip to content

Commit

Permalink
Fix MiData camp syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
carlobeltrame committed Feb 12, 2024
1 parent 8c020f1 commit 945a0ac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions api/app/Http/Controllers/CampController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use App\Http\Requests\UpdateCampRequest;
use App\Models\Camp;
use App\Models\Setting;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;

Expand Down Expand Up @@ -83,16 +84,16 @@ public function syncExternalCamps()
[
'name' => $externalCamp['name'],
'description' => $externalCamp['description'],
'cost' => $externalCamp['cost'],
'cost' => $externalCamp['cost'] == '' ? null : $externalCamp['cost'],
'maximum_participants' => $externalCamp['maximum_participants'],
'participant_count' => $externalCamp['participant_count'],
'location' => $externalCamp['location'],
'application_opening_at' => $externalCamp['application_opening_at'],
'application_closing_at' => $externalCamp['application_closing_at'],
'application_conditions' => $externalCamp['application_conditions'],
'external_application_link' => $externalCamp['external_application_link'],
'start_at' => $eventDate['start_at'] ?? null,
'finish_at' => $eventDate['finish_at'] ?? null,
'start_at' => $eventDate['start_at'] ? Carbon::parse($eventDate['start_at']) : null,
'finish_at' => $eventDate['finish_at'] ? Carbon::parse($eventDate['finish_at']) : null,
]
);
}
Expand Down

0 comments on commit 945a0ac

Please sign in to comment.