forked from mirror/pixelfed
Merge pull request #923 from pixelfed/frontend-ui-refactor
Update FederationController
This commit is contained in:
commit
ee1827ec29
1 changed files with 4 additions and 4 deletions
|
@ -96,8 +96,8 @@ class FederationController extends Controller
|
||||||
});
|
});
|
||||||
$activeHalfYear = Cache::remember('api:nodeinfo:ahy', now()->addHours(12), function() {
|
$activeHalfYear = Cache::remember('api:nodeinfo:ahy', now()->addHours(12), function() {
|
||||||
$count = collect([]);
|
$count = collect([]);
|
||||||
$likes = Like::select('profile_id')->where('created_at', '>', now()->subMonths(6)->toDateTimeString())->groupBy('profile_id')->pluck('profile_id')->toArray();
|
// $likes = Like::select('profile_id')->where('created_at', '>', now()->subMonths(6)->toDateTimeString())->groupBy('profile_id')->pluck('profile_id')->toArray();
|
||||||
$count = $count->merge($likes);
|
// $count = $count->merge($likes);
|
||||||
$statuses = Status::select('profile_id')->whereLocal(true)->where('created_at', '>', now()->subMonths(6)->toDateTimeString())->groupBy('profile_id')->pluck('profile_id')->toArray();
|
$statuses = Status::select('profile_id')->whereLocal(true)->where('created_at', '>', now()->subMonths(6)->toDateTimeString())->groupBy('profile_id')->pluck('profile_id')->toArray();
|
||||||
$count = $count->merge($statuses);
|
$count = $count->merge($statuses);
|
||||||
$profiles = Profile::select('id')->whereNull('domain')->where('created_at', '>', now()->subMonths(6)->toDateTimeString())->groupBy('id')->pluck('id')->toArray();
|
$profiles = Profile::select('id')->whereNull('domain')->where('created_at', '>', now()->subMonths(6)->toDateTimeString())->groupBy('id')->pluck('id')->toArray();
|
||||||
|
@ -106,8 +106,8 @@ class FederationController extends Controller
|
||||||
});
|
});
|
||||||
$activeMonth = Cache::remember('api:nodeinfo:am', now()->addHours(12), function() {
|
$activeMonth = Cache::remember('api:nodeinfo:am', now()->addHours(12), function() {
|
||||||
$count = collect([]);
|
$count = collect([]);
|
||||||
$likes = Like::select('profile_id')->where('created_at', '>', now()->subMonths(1)->toDateTimeString())->groupBy('profile_id')->pluck('profile_id')->toArray();
|
// $likes = Like::select('profile_id')->where('created_at', '>', now()->subMonths(1)->toDateTimeString())->groupBy('profile_id')->pluck('profile_id')->toArray();
|
||||||
$count = $count->merge($likes);
|
// $count = $count->merge($likes);
|
||||||
$statuses = Status::select('profile_id')->whereLocal(true)->where('created_at', '>', now()->subMonths(1)->toDateTimeString())->groupBy('profile_id')->pluck('profile_id')->toArray();
|
$statuses = Status::select('profile_id')->whereLocal(true)->where('created_at', '>', now()->subMonths(1)->toDateTimeString())->groupBy('profile_id')->pluck('profile_id')->toArray();
|
||||||
$count = $count->merge($statuses);
|
$count = $count->merge($statuses);
|
||||||
$profiles = Profile::select('id')->whereNull('domain')->where('created_at', '>', now()->subMonths(1)->toDateTimeString())->groupBy('id')->pluck('id')->toArray();
|
$profiles = Profile::select('id')->whereNull('domain')->where('created_at', '>', now()->subMonths(1)->toDateTimeString())->groupBy('id')->pluck('id')->toArray();
|
||||||
|
|
Loading…
Reference in a new issue