From 415826f2538e6b7aa826da57ba6e639dae3d7123 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 30 Dec 2021 23:19:38 -0700 Subject: [PATCH 1/2] Update ApiV1Controller, fix illegal operator bug by setting default min_id --- app/Http/Controllers/Api/ApiV1Controller.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 5246f64cc..c4adc5d33 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -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'] : From 0acd79742c02d93035f236e5c52f2e67371e8134 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 30 Dec 2021 23:20:12 -0700 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3457281da..cb2eb5d1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -76,7 +76,8 @@ - Updated FederationController, increase webfinger cache ttl from 12 hours to 14 days. ([745c3580](https://github.com/pixelfed/pixelfed/commit/745c3580)) - Updated DiscoverController, add yearly option and increase limit from 15 to 30 posts. ([10b6058c](https://github.com/pixelfed/pixelfed/commit/10b6058c)) - Updated RemoteAvatarFetch job, fixed bug preventing new avatars from being stored. ([92bc2845](https://github.com/pixelfed/pixelfed/commit/92bc2845)) -- Updated AccountService, fix json casting ([e5f8f344](https://github.com/pixelfed/pixelfed/commit/e5f8f344)) +- Updated AccountService, fix json casting. ([e5f8f344](https://github.com/pixelfed/pixelfed/commit/e5f8f344)) +- Updated ApiV1Controller, fix illegal operator bug by setting default min_id. ([415826f2](https://github.com/pixelfed/pixelfed/commit/415826f2)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.1 (2021-09-07)](https://github.com/pixelfed/pixelfed/compare/v0.11.0...v0.11.1)