slack and google calendar feature flags

This commit is contained in:
Adrian Hopek
2022-06-13 13:36:11 +02:00
parent 31a6d287c8
commit 2c35653f8a
4 changed files with 18 additions and 4 deletions

View File

@@ -17,10 +17,15 @@ class ClearVacationRequestDaysInGoogleCalendar implements ShouldQueue
public function __construct(
protected VacationRequest $vacationRequest,
) {}
) {
}
public function handle(): void
{
if (!config("services.google.calendar_enabled")) {
return;
}
foreach ($this->vacationRequest->event_ids ?? [] as $eventId) {
$calendarEvent = Event::find($eventId);