Pārlūkot izejas kodu

Merge pull request #3110 from pixelfed/staging

Staging
daniel 3 gadi atpakaļ
vecāks
revīzija
9d8168cf20
2 mainītis faili ar 7 papildinājumiem un 1 dzēšanām
  1. 2 1
      CHANGELOG.md
  2. 5 0
      app/Http/Controllers/Api/ApiV1Controller.php

+ 2 - 1
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)

+ 5 - 0
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'] :