From 41050f3a697fe382850311f38b9efcfe5098b19e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 13 Feb 2019 18:16:58 -0700 Subject: [PATCH] Update PublicApiController --- app/Http/Controllers/PublicApiController.php | 34 ++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index c3541b45..6fed4d5a 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -236,7 +236,22 @@ class PublicApiController extends Controller if($min || $max) { $dir = $min ? '>' : '<'; $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) ->whereNull('uri') ->where('id', $dir, $id) @@ -302,7 +317,22 @@ class PublicApiController extends Controller if($min || $max) { $dir = $min ? '>' : '<'; $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) ->whereNull('uri') ->where('id', $dir, $id)