wi-adrema-plugin/routes.php

15 lines
393 B
PHP

<?php
use Silva\Adrema\Models\Settings;
Route::get('/api/silva_adrema_event_overview', function () {
$baseUrl = Settings::get('base_url');
$response = Http::get($baseUrl . '/api/form');
if (!$response->ok()) {
return Response::json(['message' => 'Fehler beim Laden der Veranstaltungen'], 422);
}
return Response::json($response->json());
})->middleware('api');