From abe9cb3db0fad4908729aba835545062f1fa01d5 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 28 Jan 2021 18:40:13 -0700 Subject: [PATCH] Update site config, add labels to config --- app/Util/Site/Config.php | 9 ++++++++- config/instance.php | 11 ++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/Util/Site/Config.php b/app/Util/Site/Config.php index 88c211ca9..a68a03cf8 100644 --- a/app/Util/Site/Config.php +++ b/app/Util/Site/Config.php @@ -8,7 +8,7 @@ use Illuminate\Support\Str; class Config { public static function get() { - return Cache::remember('api:site:configuration:_v0.1', now()->addHours(30), function() { + return Cache::remember('api:site:configuration:_v0.2', now()->addHours(30), function() { return [ 'open_registration' => config('pixelfed.open_registration'), 'uploader' => [ @@ -62,6 +62,13 @@ class Config { 'instagram' => config('pixelfed.import.instagram.enabled'), 'mastodon' => false, 'pixelfed' => false + ], + 'label' => [ + 'covid' => [ + 'enabled' => config('instance.label.covid.enabled'), + 'org' => config('instance.label.covid.org'), + 'url' => config('instance.label.covid.url'), + ] ] ] ]; diff --git a/config/instance.php b/config/instance.php index 489118f0e..39a622351 100644 --- a/config/instance.php +++ b/config/instance.php @@ -36,6 +36,7 @@ return [ 'body' => env('PAGE_503_BODY', 'Our service is in maintenance mode, please try again later.') ] ], + 'username' => [ 'banned' => env('BANNED_USERNAMES'), 'remote' => [ @@ -61,5 +62,13 @@ return [ 'enabled' => env('OAUTH_PAT_ENABLED', false), 'id' => env('OAUTH_PAT_ID'), ] - ] + ], + + 'label' => [ + 'covid' => [ + 'enabled' => env('ENABLE_COVID_LABEL', true), + 'url' => env('COVID_LABEL_URL', 'https://www.who.int/emergencies/diseases/novel-coronavirus-2019/advice-for-public'), + 'org' => env('COVID_LABEL_ORG', 'visit the WHO website') + ] + ], ]; \ No newline at end of file