Parcourir la source

Update ApiV1Controller, fix trending accounts format. Closes #4356

Daniel Supernault il y a 2 ans
Parent
commit
37bd2ee51b
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      app/Http/Controllers/Api/ApiV1Controller.php

+ 2 - 1
app/Http/Controllers/Api/ApiV1Controller.php

@@ -3675,7 +3675,8 @@ class ApiV1Controller extends Controller
                 ->filter(function($post) {
                 ->filter(function($post) {
                     return $post && isset($post['id']);
                     return $post && isset($post['id']);
                 })
                 })
-                ->take(3);
+                ->take(3)
+                ->values();
             $profile['recent_posts'] = $ids;
             $profile['recent_posts'] = $ids;
             return $profile;
             return $profile;
         })
         })