Podcast/details added, changed routes to add title to download/stream; added podcats/deatils
This commit is contained in:
@@ -48,6 +48,18 @@ QUERY;
|
||||
|
||||
return $this->getPodcastList($request, '`podcast_meta`.`program` = :program', ['program' => (int)$program]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Details over een specifieke podcast
|
||||
*/
|
||||
public function details(Request $request, $id) {
|
||||
$podcasts = app('db')->select(self::$BASE_SQL . ' AND `podcast`.`id` = :podcast', ['podcast' => (int)$id]);
|
||||
if(count($podcasts) != 1) {
|
||||
return abort(404);
|
||||
}
|
||||
|
||||
return response()->json(new \Model\Podcast($podcasts[0]));
|
||||
}
|
||||
|
||||
private function getPodcastList(Request $request, $filter, $params)
|
||||
{
|
||||
|
||||
@@ -25,9 +25,10 @@ $app->get('agenda/kalender[/{year:\d\d\d\d}/{month:\d\d?}]', 'AgendaController@c
|
||||
$app->get('agenda/details/{id:\d+}', 'AgendaController@item' );
|
||||
|
||||
$app->get('podcast/overzicht', 'PodcastController@overview' );
|
||||
$app->get('podcast/details/{id:\d+}', 'PodcastController@details' );
|
||||
$app->get('podcast/programma/{id:\d+}', 'PodcastController@program' );
|
||||
$app->get('podcast/download/{id:\d+}', 'PodcastController@download' );
|
||||
$app->get('podcast/stream/{id:\d+}', 'PodcastController@stream' );
|
||||
$app->get('podcast/download/{id:\d+}/{title}', 'PodcastController@download' );
|
||||
$app->get('podcast/stream/{id:\d+}/{title}', 'PodcastController@stream' );
|
||||
|
||||
$app->get('programma/schema/nustraks', 'ProgramController@comingup' );
|
||||
$app->get('programma/schema/week[/{shiftWeeks:-?\d+}]', 'ProgramController@schedule' );
|
||||
|
||||
Reference in New Issue
Block a user