]> git.localhorst.tv Git - alttp.git/commitdiff
check channel ID on crew add
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 21 Oct 2023 11:47:26 +0000 (13:47 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 21 Oct 2023 11:47:26 +0000 (13:47 +0200)
app/Http/Controllers/EpisodeController.php

index 4e93427836287daea50cf6645cfaa638c5d22b59..785a24186f950e258a0dbe1afa851279e0412375 100644 (file)
@@ -56,6 +56,7 @@ class EpisodeController extends Controller
 
                if (isset($validatedData['add'])) {
                        $crew = $episode->crew()
+                               ->where('channel_id', '=', $channel->id)
                                ->where('user_id', '=', $validatedData['add'])
                                ->where('role', '=', $validatedData['role'])
                                ->first();