Update PublicApiController

pull/2556/head
Daniel Supernault 4 years ago
parent b2fe219eec
commit a443694dc0
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -310,11 +310,11 @@ class PublicApiController extends Controller
'created_at', 'created_at',
'updated_at' 'updated_at'
)->where('id', $dir, $id) )->where('id', $dir, $id)
->whereIn('type', ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album']) ->whereIn('type', ['text', 'photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])
->whereNotIn('profile_id', $filtered) ->whereNotIn('profile_id', $filtered)
->whereLocal(true) ->whereLocal(true)
->whereScope('public') ->whereScope('public')
->where('created_at', '>', now()->subDays(14)) ->where('created_at', '>', now()->subMonths(3))
->orderBy('created_at', 'desc') ->orderBy('created_at', 'desc')
->limit($limit) ->limit($limit)
->get(); ->get();
@ -338,12 +338,12 @@ class PublicApiController extends Controller
'likes_count', 'likes_count',
'reblogs_count', 'reblogs_count',
'updated_at' 'updated_at'
)->whereIn('type', ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album']) )->whereIn('type', ['text', 'photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])
->whereNotIn('profile_id', $filtered) ->whereNotIn('profile_id', $filtered)
->with('profile', 'hashtags', 'mentions') ->with('profile', 'hashtags', 'mentions')
->whereLocal(true) ->whereLocal(true)
->whereScope('public') ->whereScope('public')
->where('created_at', '>', now()->subDays(14)) ->where('created_at', '>', now()->subMonths(3))
->orderBy('created_at', 'desc') ->orderBy('created_at', 'desc')
->simplePaginate($limit); ->simplePaginate($limit);
} }
@ -429,7 +429,7 @@ class PublicApiController extends Controller
'reblogs_count', 'reblogs_count',
'created_at', 'created_at',
'updated_at' 'updated_at'
)->whereIn('type', ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album']) )->whereIn('type', ['text','photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])
->with('profile', 'hashtags', 'mentions') ->with('profile', 'hashtags', 'mentions')
->where('id', $dir, $id) ->where('id', $dir, $id)
->whereIn('profile_id', $following) ->whereIn('profile_id', $following)
@ -458,7 +458,7 @@ class PublicApiController extends Controller
'reblogs_count', 'reblogs_count',
'created_at', 'created_at',
'updated_at' 'updated_at'
)->whereIn('type', ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album']) )->whereIn('type', ['text','photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])
->with('profile', 'hashtags', 'mentions') ->with('profile', 'hashtags', 'mentions')
->whereIn('profile_id', $following) ->whereIn('profile_id', $following)
->whereNotIn('profile_id', $filtered) ->whereNotIn('profile_id', $filtered)

Loading…
Cancel
Save