From 6f72994a49e445d220af52e278455536d5830b59 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 17 Apr 2019 23:58:08 -0600 Subject: [PATCH] Update PublicApiController --- app/Http/Controllers/PublicApiController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index 50597364..2b5e0e39 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -528,7 +528,7 @@ class PublicApiController extends Controller { abort_unless(Auth::check(), 403); $profile = Profile::with('user')->whereNull('status')->whereNull('domain')->findOrFail($id); - if($profile->is_private || !$profile->user->settings->show_profile_followers && Auth::id() != $profile->user_id) { + if(Auth::id() != $profile->user_id && $profile->is_private || !$profile->user->settings->show_profile_followers) { return response()->json([]); } $followers = $profile->followers()->orderByDesc('followers.created_at')->paginate(10); @@ -542,7 +542,7 @@ class PublicApiController extends Controller { abort_unless(Auth::check(), 403); $profile = Profile::with('user')->whereNull('status')->whereNull('domain')->findOrFail($id); - if($profile->is_private || !$profile->user->settings->show_profile_following && Auth::id() != $profile->user_id) { + if(Auth::id() != $profile->user_id && $profile->is_private || !$profile->user->settings->show_profile_following) { return response()->json([]); } $following = $profile->following()->orderByDesc('followers.created_at')->paginate(10);