mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-30 19:03:21 +00:00
Merge pull request #922 from pixelfed/frontend-ui-refactor
Add git info to nodeinfo.json
This commit is contained in:
commit
fdcdead62b
1 changed files with 3 additions and 3 deletions
|
@ -102,7 +102,7 @@ class FederationController extends Controller
|
||||||
$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();
|
||||||
$count = $count->merge($profiles);
|
$count = $count->merge($profiles);
|
||||||
return $count->count();
|
return $count->unique()->count();
|
||||||
});
|
});
|
||||||
$activeMonth = Cache::remember('api:nodeinfo:am', now()->addHours(12), function() {
|
$activeMonth = Cache::remember('api:nodeinfo:am', now()->addHours(12), function() {
|
||||||
$count = collect([]);
|
$count = collect([]);
|
||||||
|
@ -112,7 +112,7 @@ class FederationController extends Controller
|
||||||
$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();
|
||||||
$count = $count->merge($profiles);
|
$count = $count->merge($profiles);
|
||||||
return $count->count();
|
return $count->unique()->count();
|
||||||
});
|
});
|
||||||
return [
|
return [
|
||||||
'metadata' => [
|
'metadata' => [
|
||||||
|
@ -140,7 +140,7 @@ class FederationController extends Controller
|
||||||
'localPosts' => \App\Status::whereLocal(true)->whereHas('media')->count(),
|
'localPosts' => \App\Status::whereLocal(true)->whereHas('media')->count(),
|
||||||
'localComments' => \App\Status::whereLocal(true)->whereNotNull('in_reply_to_id')->count(),
|
'localComments' => \App\Status::whereLocal(true)->whereNotNull('in_reply_to_id')->count(),
|
||||||
'users' => [
|
'users' => [
|
||||||
'total' => \App\User::count(),
|
'total' => \App\Profile::whereNull('status')->whereNull('domain')->count(),
|
||||||
'activeHalfyear' => $activeHalfYear,
|
'activeHalfyear' => $activeHalfYear,
|
||||||
'activeMonth' => $activeMonth,
|
'activeMonth' => $activeMonth,
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue