From 1b4eabb75f57c5937c9450fd63d46fee3091755a Mon Sep 17 00:00:00 2001 From: Mischa Spelt Date: Tue, 22 Oct 2019 21:58:18 +0200 Subject: [PATCH] /programma/schema/periode toegevoegd (was debug-optie) --- api/app/Http/Controllers/ProgramController.php | 5 ++--- api/routes/web.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/api/app/Http/Controllers/ProgramController.php b/api/app/Http/Controllers/ProgramController.php index 00e6377..a93b400 100644 --- a/api/app/Http/Controllers/ProgramController.php +++ b/api/app/Http/Controllers/ProgramController.php @@ -195,12 +195,11 @@ QUERY; return ['startdate' => $start, 'enddate' => $end, 'schedule' => $schedule]; } - public function testSchedule($from, $to) + public function period($from, $to) { $start = new \DateTimeImmutable(urldecode($from)); $end = new \DateTimeImmutable(urldecode($to)); - $this->createSchedule($start, $end, true); - return ""; + return $this->createSchedule($start, $end, isset($_GET['debug'])); } diff --git a/api/routes/web.php b/api/routes/web.php index 8f66b30..e42302d 100644 --- a/api/routes/web.php +++ b/api/routes/web.php @@ -42,9 +42,9 @@ $app->get('programma/schema/onair', 'ProgramController@onair' ); $app->get('programma/schema/nustraks', 'ProgramController@comingup' ); $app->get('programma/schema/week[/{shiftWeeks:-?\d+}]', 'ProgramController@schedule' ); $app->get('programma/schema/maand/{year:20\d\d}/{month:\d\d?}', 'ProgramController@month' ); +$app->get('programma/schema/periode/{from:\d\d\d\d-\d\d?-\d\d?}/{to:\d\d\d\d-\d\d?-\d\d?}', 'ProgramController@period' ); $app->get('programma/details/{id:\d+}', 'ProgramController@details' ); -$app->get('programma/schema/test/{from}/{to}', 'ProgramController@testSchedule' ); $app->get('programma/download/{year:20\d\d}/{month:\d\d?}/{day:\d\d?}/{hour:\d\d?}/{duration:\d\d?}', 'PodcastController@complete'); $app->get('kerkdienst', 'KerkdienstController@get');