Update PublicApiController

This commit is contained in:
Daniel Supernault 2019-02-24 23:02:11 -07:00
parent d1d8fa4acd
commit 3b7802814d
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -305,8 +305,10 @@ class PublicApiController extends Controller
// $timeline = Timeline::build()->local();
$pid = Auth::user()->profile->id;
$following = Follower::whereProfileId($pid)->pluck('following_id');
$following->push($pid)->toArray();
$following = Cache::remember('profile:following:'.$pid, 1440, function() use($pid) {
$following = Follower::whereProfileId($pid)->pluck('following_id');
return $following->push($pid)->toArray();
});
$private = Profile::whereIsPrivate(true)->orWhereNotNull('status')->where('id', '!=', $pid)->pluck('id');
$filters = UserFilter::whereUserId($pid)