feat(sync): add hourly CTS sync schedule
This commit is contained in:
parent
951ed81e47
commit
c3fa352adb
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue