1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-25 01:05:36 +00:00

Update ApiV1Controller, fix illegal operator bug by setting default min_id

This commit is contained in:
Daniel Supernault 2021-12-30 23:19:38 -07:00
parent 35e2cf1f6b
commit 415826f253
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -514,6 +514,11 @@ class ApiV1Controller extends Controller
$limit = $request->limit ?? 20;
$max_id = $request->max_id;
$min_id = $request->min_id;
if(!$max_id && !$min_id) {
$min_id = 1;
}
$pid = $request->user()->profile_id;
$scope = $request->only_media == true ?
['photo', 'photo:album', 'video', 'video:album'] :