forked from mirror/pixelfed
Update PublicApiController, remove expensive and unused relationships
This commit is contained in:
parent
fefcbae911
commit
2ecc314434
1 changed files with 0 additions and 3 deletions
|
@ -364,7 +364,6 @@ class PublicApiController extends Controller
|
||||||
)
|
)
|
||||||
->whereNull(['in_reply_to_id', 'reblog_of_id'])
|
->whereNull(['in_reply_to_id', 'reblog_of_id'])
|
||||||
->whereIn('type', ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])
|
->whereIn('type', ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])
|
||||||
->with('profile', 'hashtags', 'mentions')
|
|
||||||
->whereLocal(true)
|
->whereLocal(true)
|
||||||
->whereScope('public')
|
->whereScope('public')
|
||||||
->orderBy('id', 'desc')
|
->orderBy('id', 'desc')
|
||||||
|
@ -517,7 +516,6 @@ class PublicApiController extends Controller
|
||||||
->when($textOnlyReplies != true, function($q, $textOnlyReplies) {
|
->when($textOnlyReplies != true, function($q, $textOnlyReplies) {
|
||||||
return $q->whereNull('in_reply_to_id');
|
return $q->whereNull('in_reply_to_id');
|
||||||
})
|
})
|
||||||
->with('profile', 'hashtags', 'mentions')
|
|
||||||
->where('id', $dir, $id)
|
->where('id', $dir, $id)
|
||||||
->whereIn('profile_id', $following)
|
->whereIn('profile_id', $following)
|
||||||
->whereIn('visibility',['public', 'unlisted', 'private'])
|
->whereIn('visibility',['public', 'unlisted', 'private'])
|
||||||
|
@ -564,7 +562,6 @@ class PublicApiController extends Controller
|
||||||
->when(!$textOnlyReplies, function($q, $textOnlyReplies) {
|
->when(!$textOnlyReplies, function($q, $textOnlyReplies) {
|
||||||
return $q->whereNull('in_reply_to_id');
|
return $q->whereNull('in_reply_to_id');
|
||||||
})
|
})
|
||||||
->with('profile', 'hashtags', 'mentions')
|
|
||||||
->whereIn('profile_id', $following)
|
->whereIn('profile_id', $following)
|
||||||
->whereIn('visibility',['public', 'unlisted', 'private'])
|
->whereIn('visibility',['public', 'unlisted', 'private'])
|
||||||
->orderBy('created_at', 'desc')
|
->orderBy('created_at', 'desc')
|
||||||
|
|
Loading…
Reference in a new issue