mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 22:41:27 +00:00
Update ApiController
This commit is contained in:
parent
43c18e866c
commit
11cd75e8e8
1 changed files with 23 additions and 14 deletions
|
@ -200,6 +200,9 @@ class ApiV1Controller extends Controller
|
||||||
abort_if(!$request->user(), 403);
|
abort_if(!$request->user(), 403);
|
||||||
$profile = Profile::whereNull('status')->findOrFail($id);
|
$profile = Profile::whereNull('status')->findOrFail($id);
|
||||||
|
|
||||||
|
if($profile->domain) {
|
||||||
|
$res = [];
|
||||||
|
} else {
|
||||||
$settings = $profile->user->settings;
|
$settings = $profile->user->settings;
|
||||||
if($settings->show_profile_followers == true) {
|
if($settings->show_profile_followers == true) {
|
||||||
$limit = $request->input('limit') ?? 40;
|
$limit = $request->input('limit') ?? 40;
|
||||||
|
@ -209,6 +212,7 @@ class ApiV1Controller extends Controller
|
||||||
} else {
|
} else {
|
||||||
$res = [];
|
$res = [];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return response()->json($res);
|
return response()->json($res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,6 +228,9 @@ class ApiV1Controller extends Controller
|
||||||
abort_if(!$request->user(), 403);
|
abort_if(!$request->user(), 403);
|
||||||
$profile = Profile::whereNull('status')->findOrFail($id);
|
$profile = Profile::whereNull('status')->findOrFail($id);
|
||||||
|
|
||||||
|
if($profile->domain) {
|
||||||
|
$res = [];
|
||||||
|
} else {
|
||||||
$settings = $profile->user->settings;
|
$settings = $profile->user->settings;
|
||||||
if($settings->show_profile_following == true) {
|
if($settings->show_profile_following == true) {
|
||||||
$limit = $request->input('limit') ?? 40;
|
$limit = $request->input('limit') ?? 40;
|
||||||
|
@ -233,6 +240,8 @@ class ApiV1Controller extends Controller
|
||||||
} else {
|
} else {
|
||||||
$res = [];
|
$res = [];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return response()->json($res);
|
return response()->json($res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue