Explorar o código

Update ApiV1Controller, improve query

Daniel Supernault hai 3 meses
pai
achega
aa6f95b1cf
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/Http/Controllers/Api/ApiV1Controller.php

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

@@ -1537,7 +1537,7 @@ class ApiV1Controller extends Controller
 
 
         $user = $request->user();
         $user = $request->user();
 
 
-        $res = FollowRequest::whereFollowingId($user->profile->id)
+        $res = FollowRequest::whereFollowingId($user->profile_id)
             ->limit($request->input('limit', 40))
             ->limit($request->input('limit', 40))
             ->pluck('follower_id')
             ->pluck('follower_id')
             ->map(function ($id) {
             ->map(function ($id) {