mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 21:43:17 +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)
|
||||
->whereIn('visibility', $visibility)
|
||||
->when(!$owner, function($q, $owner) {
|
||||
return $q->whereNotNull('published_at');
|
||||
})
|
||||
->orderByDesc('id')
|
||||
->paginate(9)
|
||||
->map(function($collection) {
|
||||
|
|
Loading…
Reference in a new issue