mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 08:44:49 +00:00
Merge pull request #1223 from pixelfed/frontend-ui-refactor
Update FederationController, closes #1213
This commit is contained in:
commit
bb93f1f055
1 changed files with 0 additions and 9 deletions
|
@ -91,14 +91,6 @@ class FederationController extends Controller
|
||||||
public function nodeinfo()
|
public function nodeinfo()
|
||||||
{
|
{
|
||||||
$res = Cache::remember('api:nodeinfo', now()->addMinutes(15), function () {
|
$res = Cache::remember('api:nodeinfo', now()->addMinutes(15), function () {
|
||||||
$git = Cache::remember('api:nodeinfo:git', now()->addHours(1), function() {
|
|
||||||
$hash = exec('git rev-parse HEAD');
|
|
||||||
$gitUrl = 'https://github.com/pixelfed/pixelfed/commit/' . $hash;
|
|
||||||
return [
|
|
||||||
'commit_hash' => $hash,
|
|
||||||
'url' => $gitUrl
|
|
||||||
];
|
|
||||||
});
|
|
||||||
$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();
|
||||||
|
@ -125,7 +117,6 @@ class FederationController extends Controller
|
||||||
'software' => [
|
'software' => [
|
||||||
'homepage' => 'https://pixelfed.org',
|
'homepage' => 'https://pixelfed.org',
|
||||||
'repo' => 'https://github.com/pixelfed/pixelfed',
|
'repo' => 'https://github.com/pixelfed/pixelfed',
|
||||||
'git' => $git
|
|
||||||
],
|
],
|
||||||
'captcha' => (bool) config('pixelfed.recaptcha'),
|
'captcha' => (bool) config('pixelfed.recaptcha'),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue