diff --git a/app/Http/Controllers/LiveStreamController.php b/app/Http/Controllers/LiveStreamController.php index 1aacb4ab3..0eea79626 100644 --- a/app/Http/Controllers/LiveStreamController.php +++ b/app/Http/Controllers/LiveStreamController.php @@ -336,11 +336,8 @@ class LiveStreamController extends Controller public function getConfig(Request $request) { - abort_if(!config('livestreaming.enabled'), 400); - abort_if(!$request->user(), 403); - $res = [ - 'enabled' => config('livestreaming.enabled'), + 'enabled' => (bool) config('livestreaming.enabled'), 'broadcast' => [ 'sources' => config('livestreaming.broadcast.sources'), 'limits' => config('livestreaming.broadcast.limits') diff --git a/routes/api.php b/routes/api.php index 3459a68e7..9ffcd9c49 100644 --- a/routes/api.php +++ b/routes/api.php @@ -110,7 +110,7 @@ Route::group(['prefix' => 'api'], function() use($middleware) { Route::post('chat/ban-user', 'LiveStreamController@banChatUser')->middleware($middleware); Route::post('chat/pin', 'LiveStreamController@pinChatComment')->middleware($middleware); Route::post('chat/unpin', 'LiveStreamController@unpinChatComment')->middleware($middleware); - Route::get('config', 'LiveStreamController@getConfig')->middleware($middleware); + Route::get('config', 'LiveStreamController@getConfig'); Route::post('broadcast/publish', 'LiveStreamController@clientBroadcastPublish'); Route::post('broadcast/finish', 'LiveStreamController@clientBroadcastFinish'); });