Merge pull request #6676 from pixelfed/shleeable-patch-10

Stories API: PostgreSQL story carousel endpoints crash due to calling collection methods on query builder
pull/6699/head
dansup 1 month ago committed by GitHub
commit d6cd65463d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -46,6 +46,7 @@ class StoryApiV1Controller extends Controller
->leftJoin('followers', 'followers.following_id', 'stories.profile_id')
->where('followers.profile_id', $pid)
->where('stories.active', true)
->get()
->map(function ($s) {
$r = new \StdClass;
$r->id = $s->id;
@ -158,6 +159,7 @@ class StoryApiV1Controller extends Controller
->leftJoin('followers', 'followers.following_id', 'stories.profile_id')
->where('followers.profile_id', $pid)
->where('stories.active', true)
->get()
->map(function ($s) {
$r = new \StdClass;
$r->id = $s->id;

Loading…
Cancel
Save