Update PublicApiController

pull/780/head
Daniel Supernault 7 years ago
parent e7301aef01
commit f057ab689a
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -33,7 +33,6 @@ class PublicApiController extends Controller
public function __construct() public function __construct()
{ {
$this->middleware('throttle:3000, 30');
$this->fractal = new Fractal\Manager(); $this->fractal = new Fractal\Manager();
$this->fractal->setSerializer(new ArraySerializer()); $this->fractal->setSerializer(new ArraySerializer());
} }
@ -223,7 +222,11 @@ class PublicApiController extends Controller
// $timeline = Timeline::build()->local(); // $timeline = Timeline::build()->local();
$pid = Auth::user()->profile->id; $pid = Auth::user()->profile->id;
$private = Profile::whereIsPrivate(true)->orWhereNotNull('status')->where('id', '!=', $pid)->pluck('id'); $private = Profile::whereIsPrivate(true)
->orWhere('unlisted', true)
->orWhere('status', '!=', null)
->where('id', '!=', $pid)
->pluck('id');
$filters = UserFilter::whereUserId($pid) $filters = UserFilter::whereUserId($pid)
->whereFilterableType('App\Profile') ->whereFilterableType('App\Profile')
->whereIn('filter_type', ['mute', 'block']) ->whereIn('filter_type', ['mute', 'block'])

Loading…
Cancel
Save