From baa802ad33902059ad7531e39932cb31fdf915bc Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 8 Nov 2018 20:24:20 -0700 Subject: [PATCH] Update InternalApiController --- app/Http/Controllers/InternalApiController.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/InternalApiController.php b/app/Http/Controllers/InternalApiController.php index fc9dd53f5..0fad95c73 100644 --- a/app/Http/Controllers/InternalApiController.php +++ b/app/Http/Controllers/InternalApiController.php @@ -59,25 +59,23 @@ class InternalApiController extends Controller $profile = Profile::whereUsername($username)->first(); $status = Status::whereProfileId($profile->id)->find($postId); if($request->filled('min_id') || $request->filled('max_id')) { - $q = false; - $limit = 50; if($request->filled('min_id')) { $replies = $status->comments() - ->select('id', 'caption', 'rendered', 'profile_id', 'created_at') + ->select('id', 'caption', 'rendered', 'profile_id', 'in_reply_to_id', 'created_at') ->where('id', '>=', $request->min_id) ->orderBy('id', 'desc') ->paginate($limit); } if($request->filled('max_id')) { $replies = $status->comments() - ->select('id', 'caption', 'rendered', 'profile_id', 'created_at') + ->select('id', 'caption', 'rendered', 'profile_id', 'in_reply_to_id', 'created_at') ->where('id', '<=', $request->max_id) ->orderBy('id', 'desc') ->paginate($limit); } } else { $replies = $status->comments() - ->select('id', 'caption', 'rendered', 'profile_id', 'created_at') + ->select('id', 'caption', 'rendered', 'profile_id', 'in_reply_to_id', 'created_at') ->orderBy('id', 'desc') ->paginate($limit); }