mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-22 13:03:16 +00:00
Update ApiV1Controller, handle public feed parameter bug to gracefully fallback to min_id=1 when max_id=0
This commit is contained in:
parent
d6eac65555
commit
e3826c587d
1 changed files with 3 additions and 0 deletions
|
@ -2627,6 +2627,9 @@ class ApiV1Controller extends Controller
|
|||
$napi = $request->has(self::PF_API_ENTITY_KEY);
|
||||
$min = $request->input('min_id');
|
||||
$max = $request->input('max_id');
|
||||
if ($max == 0) {
|
||||
$min = 1;
|
||||
}
|
||||
$minOrMax = $request->anyFilled(['max_id', 'min_id']);
|
||||
$limit = $request->input('limit') ?? 20;
|
||||
if ($limit > 40) {
|
||||
|
|
Loading…
Reference in a new issue