mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-26 06:20:46 +00:00
Update ApiV1Controller, improve local/remote logic in public timeline endpoint
This commit is contained in:
parent
434a99aac0
commit
4ff179ad4d
1 changed files with 3 additions and 2 deletions
|
@ -1973,14 +1973,15 @@ class ApiV1Controller extends Controller
|
|||
'min_id' => 'nullable|integer|min:0|max:' . PHP_INT_MAX,
|
||||
'max_id' => 'nullable|integer|min:0|max:' . PHP_INT_MAX,
|
||||
'limit' => 'nullable|integer|max:100',
|
||||
'remote' => 'sometimes'
|
||||
'remote' => 'sometimes',
|
||||
'local' => 'sometimes'
|
||||
]);
|
||||
|
||||
$min = $request->input('min_id');
|
||||
$max = $request->input('max_id');
|
||||
$limit = $request->input('limit') ?? 20;
|
||||
$user = $request->user();
|
||||
$remote = $request->has('remote');
|
||||
$remote = ($request->has('remote') && $request->input('remote') == true) || ($request->filled('local') && $request->input('local') != true);
|
||||
$filtered = $user ? UserFilterService::filters($user->profile_id) : [];
|
||||
|
||||
if($remote && config('instance.timeline.network.cached')) {
|
||||
|
|
Loading…
Reference in a new issue