Update Discover, allow public discover access

pull/2621/head
Daniel Supernault 5 years ago
parent 9fd90e174b
commit 1404ac6e6f
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -37,7 +37,7 @@ class DiscoverController extends Controller
public function home(Request $request)
{
abort_if(!Auth::check(), 403);
abort_if(!Auth::check() && config('instance.discover.public') == false, 403);
return view('discover.home');
}
@ -113,6 +113,8 @@ class DiscoverController extends Controller
public function trendingApi(Request $request)
{
abort_if(config('instance.discover.public') == false && !Auth::check(), 403);
$this->validate($request, [
'range' => 'nullable|string|in:daily,monthly'
]);

@ -10,6 +10,7 @@ return [
],
'discover' => [
'public' => env('INSTANCE_DISCOVER_PUBLIC', false),
'loops' => [
'enabled' => env('EXP_LOOPS', false),
],

Loading…
Cancel
Save