feat(sync): add hourly CTS sync schedule

This commit is contained in:
Thorsten Bus 2026-03-02 12:03:52 +01:00
parent 951ed81e47
commit c3fa352adb
2 changed files with 5 additions and 0 deletions

View file

@ -51,6 +51,7 @@ public function index(): Response
->get()
->map(fn (Service $service) => [
'id' => $service->id,
'cts_event_id' => $service->cts_event_id,
'title' => $service->title,
'date' => $service->date?->toDateString(),
'preacher_name' => $service->preacher_name,

View file

@ -3,6 +3,7 @@
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Console\Scheduling\Schedule;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
@ -14,6 +15,9 @@
->withCommands([
__DIR__.'/../app/Console/Commands',
])
->withSchedule(function (Schedule $schedule): void {
$schedule->command('cts:sync')->hourly();
})
->withMiddleware(function (Middleware $middleware): void {
$middleware->web(append: [
\App\Http\Middleware\HandleInertiaRequests::class,