Skip to content

Commit

Permalink
Merge pull request #4340 from Roardom/playlist-comment-delete
Browse files Browse the repository at this point in the history
(Fix) Delete playlist comments on playlist deletion
  • Loading branch information
HDVinnie authored Nov 4, 2024
2 parents 6e822ca + 03fed5c commit 18a46cb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/Http/Controllers/PlaylistController.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ public function destroy(Request $request, Playlist $playlist): \Illuminate\Http\
abort_unless($request->user()->id == $playlist->user_id || $request->user()->group->is_modo, 403);

$playlist->torrents()->detach();
$playlist->comments()->delete();
$playlist->delete();

return to_route('playlists.index')
Expand Down

0 comments on commit 18a46cb

Please sign in to comment.