mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 14:33:18 +00:00
Update CollectionController, limit unpublished collections to owner
This commit is contained in:
parent
dab9bcaf36
commit
a0061eb56c
1 changed files with 3 additions and 0 deletions
|
@ -237,6 +237,9 @@ class CollectionController extends Controller
|
||||||
|
|
||||||
return Collection::whereProfileId($profile->id)
|
return Collection::whereProfileId($profile->id)
|
||||||
->whereIn('visibility', $visibility)
|
->whereIn('visibility', $visibility)
|
||||||
|
->when(!$owner, function($q, $owner) {
|
||||||
|
return $q->whereNotNull('published_at');
|
||||||
|
})
|
||||||
->orderByDesc('id')
|
->orderByDesc('id')
|
||||||
->paginate(9)
|
->paginate(9)
|
||||||
->map(function($collection) {
|
->map(function($collection) {
|
||||||
|
|
Loading…
Reference in a new issue