mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 06:23:18 +00:00
Update PublicApiController, return empty 403 response
This commit is contained in:
parent
6ba7d43391
commit
d9e4cc3df6
1 changed files with 6 additions and 3 deletions
|
@ -422,8 +422,8 @@ class PublicApiController extends Controller
|
||||||
|
|
||||||
public function homeTimelineApi(Request $request)
|
public function homeTimelineApi(Request $request)
|
||||||
{
|
{
|
||||||
if(!Auth::check()) {
|
if(!$request->user()) {
|
||||||
return abort(403);
|
return response('', 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->validate($request,[
|
$this->validate($request,[
|
||||||
|
@ -586,7 +586,10 @@ class PublicApiController extends Controller
|
||||||
|
|
||||||
public function networkTimelineApi(Request $request)
|
public function networkTimelineApi(Request $request)
|
||||||
{
|
{
|
||||||
abort_if(!Auth::check(), 403);
|
if(!$request->user()) {
|
||||||
|
return response('', 403);
|
||||||
|
}
|
||||||
|
|
||||||
abort_if(config('federation.network_timeline') == false, 404);
|
abort_if(config('federation.network_timeline') == false, 404);
|
||||||
|
|
||||||
$this->validate($request,[
|
$this->validate($request,[
|
||||||
|
|
Loading…
Reference in a new issue