diff --git a/api/app/Http/Controllers/ProgramController.php b/api/app/Http/Controllers/ProgramController.php index 9af0c59..6c5b0ae 100644 --- a/api/app/Http/Controllers/ProgramController.php +++ b/api/app/Http/Controllers/ProgramController.php @@ -296,7 +296,7 @@ QUERY; } } - public function onair_text() { + public function onair_text(Request $request) { $start = new \DateTimeImmutable('now'); $einde = new \DateTimeImmutable('now + 1 second'); $schema = $this->createSchedule($start, $einde); @@ -312,7 +312,9 @@ QUERY; } } - return $program->name . " - " . $current->title . " - " . $current->artist; + return $request->get('program_only', false) + ? $program->name + : $program->name . " - " . $current->title . " - " . $current->artist; } else { return $program->name; }