mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-21 20:48:00 +01:00
Simplified playlist 404 if statement
This commit is contained in:
parent
25e023ccb7
commit
510d0e80ac
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ class PlaylistsController extends Controller
|
|||
public function getDownload($id, $extension)
|
||||
{
|
||||
$playlist = Playlist::with('tracks', 'tracks.trackFiles', 'user', 'tracks.album')->find($id);
|
||||
if (!$playlist || (!$playlist->is_public && !Auth::check()) || !$playlist->canView(Auth::user()) || (!$playlist->is_public && ($playlist->user_id !== Auth::user()->id))) {
|
||||
if (!$playlist || !$playlist->canView(Auth::user())) {
|
||||
App::abort(404);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue