Update InternalApiController

This commit is contained in:
Daniel Supernault 2019-05-27 23:06:20 -06:00
parent 52b5eab9b7
commit a7b3174b1c
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 7 additions and 1 deletions

View File

@ -106,7 +106,12 @@ class InternalApiController extends Controller
});
$following = array_merge($following, $filters);
$posts = Status::select('id', 'caption', 'profile_id')
$posts = Status::select(
'id',
'caption',
'profile_id',
'type'
)
->whereNull('uri')
->whereHas('media')
->whereHas('profile', function($q) {
@ -123,6 +128,7 @@ class InternalApiController extends Controller
$res = [
'posts' => $posts->map(function($post) {
return [
'type' => $post->type,
'url' => $post->url(),
'thumb' => $post->thumb(),
];