1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-25 09:17:03 +00:00

Merge pull request #838 from pixelfed/frontend-ui-refactor

Update PublicApiController
This commit is contained in:
daniel 2019-02-13 18:17:36 -07:00 committed by GitHub
commit 41567d5aaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -236,7 +236,22 @@ class PublicApiController extends Controller
if($min || $max) { if($min || $max) {
$dir = $min ? '>' : '<'; $dir = $min ? '>' : '<';
$id = $min ?? $max; $id = $min ?? $max;
$timeline = Status::whereHas('media') $timeline = Status::select(
'id',
'uri',
'caption',
'rendered',
'profile_id',
'type',
'in_reply_to_id',
'reblog_of_id',
'is_nsfw',
'scope',
'local',
'created_at',
'updated_at'
)
->whereHas('media')
->whereLocal(true) ->whereLocal(true)
->whereNull('uri') ->whereNull('uri')
->where('id', $dir, $id) ->where('id', $dir, $id)
@ -302,7 +317,22 @@ class PublicApiController extends Controller
if($min || $max) { if($min || $max) {
$dir = $min ? '>' : '<'; $dir = $min ? '>' : '<';
$id = $min ?? $max; $id = $min ?? $max;
$timeline = Status::whereHas('media') $timeline = Status::select(
'id',
'uri',
'caption',
'rendered',
'profile_id',
'type',
'in_reply_to_id',
'reblog_of_id',
'is_nsfw',
'scope',
'local',
'created_at',
'updated_at'
)
->whereHas('media')
->whereLocal(true) ->whereLocal(true)
->whereNull('uri') ->whereNull('uri')
->where('id', $dir, $id) ->where('id', $dir, $id)