mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 22:41:27 +00:00
Update InternalApiController
This commit is contained in:
parent
52b5eab9b7
commit
a7b3174b1c
1 changed files with 7 additions and 1 deletions
|
@ -106,7 +106,12 @@ class InternalApiController extends Controller
|
||||||
});
|
});
|
||||||
$following = array_merge($following, $filters);
|
$following = array_merge($following, $filters);
|
||||||
|
|
||||||
$posts = Status::select('id', 'caption', 'profile_id')
|
$posts = Status::select(
|
||||||
|
'id',
|
||||||
|
'caption',
|
||||||
|
'profile_id',
|
||||||
|
'type'
|
||||||
|
)
|
||||||
->whereNull('uri')
|
->whereNull('uri')
|
||||||
->whereHas('media')
|
->whereHas('media')
|
||||||
->whereHas('profile', function($q) {
|
->whereHas('profile', function($q) {
|
||||||
|
@ -123,6 +128,7 @@ class InternalApiController extends Controller
|
||||||
$res = [
|
$res = [
|
||||||
'posts' => $posts->map(function($post) {
|
'posts' => $posts->map(function($post) {
|
||||||
return [
|
return [
|
||||||
|
'type' => $post->type,
|
||||||
'url' => $post->url(),
|
'url' => $post->url(),
|
||||||
'thumb' => $post->thumb(),
|
'thumb' => $post->thumb(),
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue