Explorar o código

Update LiveStreamController

Daniel Supernault %!s(int64=3) %!d(string=hai) anos
pai
achega
433eace75e
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app/Http/Controllers/LiveStreamController.php

+ 2 - 2
app/Http/Controllers/LiveStreamController.php

@@ -368,16 +368,16 @@ class LiveStreamController extends Controller
 
 		if($token) {
 			$stream = LiveStream::whereStreamKey($key)->firstOrFail();
+			StreamStart::dispatch($stream->profile_id);
 			return redirect($stream->getStreamRtmpUrl(), 301);
 		} else {
 			$stream = LiveStream::whereStreamId($key)->firstOrFail();
+			StreamStart::dispatch($stream->profile_id);
 		}
 
 		if($request->filled('name') && $token == false) {
 			$stream->live_at = now();
 			$stream->save();
-
-			StreamStart::dispatch($stream->profile_id);
 			return [];
 		} else {
 			abort(400);