#428 -- Make all NP records show for authenticated requests.
This commit is contained in:
parent
4285996d1e
commit
a42ac4149d
|
@ -90,9 +90,12 @@ class NowplayingController
|
||||||
return $response->withJson('Station not found.', 404);
|
return $response->withJson('Station not found.', 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
$np = array_filter($np, function($np_row) {
|
// If unauthenticated, hide non-public stations from full view.
|
||||||
return $np_row->station->is_public;
|
if ($request->getAttribute('user') === null) {
|
||||||
});
|
$np = array_filter($np, function($np_row) {
|
||||||
|
return $np_row->station->is_public;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($np as $np_row) {
|
foreach ($np as $np_row) {
|
||||||
$np_row->now_playing->recalculate();
|
$np_row->now_playing->recalculate();
|
||||||
|
|
Loading…
Reference in New Issue