Update ApiV1Controller, handle public feed parameter bug to gracefully fallback to min_id=1 when max_id=0

This commit is contained in:
Daniel Supernault 2024-03-05 04:43:21 -07:00
parent d6eac65555
commit e3826c587d
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -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) {