Explorar el Código

Update InternalApiController

Daniel Supernault hace 6 años
padre
commit
baa802ad33
Se han modificado 1 ficheros con 3 adiciones y 5 borrados
  1. 3 5
      app/Http/Controllers/InternalApiController.php

+ 3 - 5
app/Http/Controllers/InternalApiController.php

@@ -59,25 +59,23 @@ class InternalApiController extends Controller
         $profile = Profile::whereUsername($username)->first();
         $profile = Profile::whereUsername($username)->first();
         $status = Status::whereProfileId($profile->id)->find($postId);
         $status = Status::whereProfileId($profile->id)->find($postId);
         if($request->filled('min_id') || $request->filled('max_id')) {
         if($request->filled('min_id') || $request->filled('max_id')) {
-            $q = false;
-            $limit = 50;
             if($request->filled('min_id')) {
             if($request->filled('min_id')) {
                 $replies = $status->comments()
                 $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)
                 ->where('id', '>=', $request->min_id)
                 ->orderBy('id', 'desc')
                 ->orderBy('id', 'desc')
                 ->paginate($limit);
                 ->paginate($limit);
             }
             }
             if($request->filled('max_id')) {
             if($request->filled('max_id')) {
                 $replies = $status->comments()
                 $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)
                 ->where('id', '<=', $request->max_id)
                 ->orderBy('id', 'desc')
                 ->orderBy('id', 'desc')
                 ->paginate($limit);
                 ->paginate($limit);
             }
             }
         } else {
         } else {
             $replies = $status->comments()
             $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')
             ->orderBy('id', 'desc')
             ->paginate($limit);
             ->paginate($limit);
         }
         }