Update LiveStreamController, remove auth middleware from config endpoint

This commit is contained in:
Daniel Supernault 2022-06-29 00:28:58 -06:00
parent 4bd9e12f00
commit feb969b908
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 2 additions and 5 deletions

View file

@ -336,11 +336,8 @@ class LiveStreamController extends Controller
public function getConfig(Request $request) public function getConfig(Request $request)
{ {
abort_if(!config('livestreaming.enabled'), 400);
abort_if(!$request->user(), 403);
$res = [ $res = [
'enabled' => config('livestreaming.enabled'), 'enabled' => (bool) config('livestreaming.enabled'),
'broadcast' => [ 'broadcast' => [
'sources' => config('livestreaming.broadcast.sources'), 'sources' => config('livestreaming.broadcast.sources'),
'limits' => config('livestreaming.broadcast.limits') 'limits' => config('livestreaming.broadcast.limits')

View file

@ -110,7 +110,7 @@ Route::group(['prefix' => 'api'], function() use($middleware) {
Route::post('chat/ban-user', 'LiveStreamController@banChatUser')->middleware($middleware); Route::post('chat/ban-user', 'LiveStreamController@banChatUser')->middleware($middleware);
Route::post('chat/pin', 'LiveStreamController@pinChatComment')->middleware($middleware); Route::post('chat/pin', 'LiveStreamController@pinChatComment')->middleware($middleware);
Route::post('chat/unpin', 'LiveStreamController@unpinChatComment')->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/publish', 'LiveStreamController@clientBroadcastPublish');
Route::post('broadcast/finish', 'LiveStreamController@clientBroadcastFinish'); Route::post('broadcast/finish', 'LiveStreamController@clientBroadcastFinish');
}); });