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

Update CollectionController, limit unpublished collections to owner

This commit is contained in:
Daniel Supernault 2022-04-03 03:25:08 -06:00
parent dab9bcaf36
commit a0061eb56c
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -237,6 +237,9 @@ class CollectionController extends Controller
return Collection::whereProfileId($profile->id)
->whereIn('visibility', $visibility)
->when(!$owner, function($q, $owner) {
return $q->whereNotNull('published_at');
})
->orderByDesc('id')
->paginate(9)
->map(function($collection) {