Browse Source

Update ApiV1Controller, fix follow/unfollow endpoints

Daniel Supernault 5 years ago
parent
commit
fb91892ee2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/Http/Controllers/Api/ApiV1Controller.php

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

@@ -369,7 +369,7 @@ class ApiV1Controller extends Controller
 
         $target = Profile::where('id', '!=', $user->id)
             ->whereNull('status')
-            ->findOrFail($item);
+            ->findOrFail($id);
 
         $private = (bool) $target->is_private;
         $remote = (bool) $target->domain;
@@ -454,7 +454,7 @@ class ApiV1Controller extends Controller
 
         $target = Profile::where('id', '!=', $user->id)
             ->whereNull('status')
-            ->findOrFail($item);
+            ->findOrFail($id);
 
         $private = (bool) $target->is_private;
         $remote = (bool) $target->domain;