mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 01:05:36 +00:00
Update site config, fix boolean casting
This commit is contained in:
parent
74261999d3
commit
955696b8a0
2 changed files with 10 additions and 10 deletions
|
@ -977,7 +977,7 @@ class ApiV1Controller extends Controller
|
|||
'short_description' => 'Pixelfed - Photo sharing for everyone',
|
||||
'languages' => ['en'],
|
||||
'max_toot_chars' => (int) config('pixelfed.max_caption_length'),
|
||||
'registrations' => config_cache('pixelfed.open_registration'),
|
||||
'registrations' => (bool) config_cache('pixelfed.open_registration'),
|
||||
'stats' => [
|
||||
'user_count' => 0,
|
||||
'status_count' => 0,
|
||||
|
@ -994,7 +994,7 @@ class ApiV1Controller extends Controller
|
|||
'max_caption_length' => (int) config('pixelfed.max_caption_length'),
|
||||
'max_bio_length' => (int) config('pixelfed.max_bio_length'),
|
||||
'max_album_length' => (int) config_cache('pixelfed.max_album_length'),
|
||||
'mobile_apis' => config_cache('pixelfed.oauth_enabled')
|
||||
'mobile_apis' => (bool) config_cache('pixelfed.oauth_enabled')
|
||||
|
||||
]
|
||||
];
|
||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Support\Str;
|
|||
class Config {
|
||||
|
||||
public static function get() {
|
||||
return Cache::remember('api:site:configuration:_v0.2', now()->addMinutes(5), function() {
|
||||
return Cache::remember('api:site:configuration:_v0.3', now()->addMinutes(5), function() {
|
||||
return [
|
||||
'open_registration' => (bool) config_cache('pixelfed.open_registration'),
|
||||
'uploader' => [
|
||||
|
@ -19,15 +19,15 @@ class Config {
|
|||
|
||||
'max_collection_length' => config('pixelfed.max_collection_length', 18),
|
||||
|
||||
'optimize_image' => config('pixelfed.optimize_image'),
|
||||
'optimize_video' => config('pixelfed.optimize_video'),
|
||||
'optimize_image' => (bool) config('pixelfed.optimize_image'),
|
||||
'optimize_video' => (bool) config('pixelfed.optimize_video'),
|
||||
|
||||
'media_types' => config_cache('pixelfed.media_types'),
|
||||
'enforce_account_limit' => config_cache('pixelfed.enforce_account_limit')
|
||||
'enforce_account_limit' => (bool) config_cache('pixelfed.enforce_account_limit')
|
||||
],
|
||||
|
||||
'activitypub' => [
|
||||
'enabled' => config_cache('federation.activitypub.enabled'),
|
||||
'enabled' => (bool) config_cache('federation.activitypub.enabled'),
|
||||
'remote_follow' => config('federation.activitypub.remoteFollow')
|
||||
],
|
||||
|
||||
|
@ -54,9 +54,9 @@ class Config {
|
|||
],
|
||||
|
||||
'features' => [
|
||||
'mobile_apis' => config_cache('pixelfed.oauth_enabled'),
|
||||
'mobile_apis' => (bool) config_cache('pixelfed.oauth_enabled'),
|
||||
'circles' => false,
|
||||
'stories' => config_cache('instance.stories.enabled'),
|
||||
'stories' => (bool) config_cache('instance.stories.enabled'),
|
||||
'video' => Str::contains(config_cache('pixelfed.media_types'), 'video/mp4'),
|
||||
'import' => [
|
||||
'instagram' => config_cache('pixelfed.import.instagram.enabled'),
|
||||
|
@ -65,7 +65,7 @@ class Config {
|
|||
],
|
||||
'label' => [
|
||||
'covid' => [
|
||||
'enabled' => config('instance.label.covid.enabled'),
|
||||
'enabled' => (bool) config('instance.label.covid.enabled'),
|
||||
'org' => config('instance.label.covid.org'),
|
||||
'url' => config('instance.label.covid.url'),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue