ソースを参照

Update ApiV1Controller, fix instance endpoint #2233

Daniel Supernault 5 年 前
コミット
b7ee9981eb
1 ファイル変更6 行追加6 行削除
  1. 6 6
      app/Http/Controllers/Api/ApiV1Controller.php

+ 6 - 6
app/Http/Controllers/Api/ApiV1Controller.php

@@ -938,7 +938,7 @@ class ApiV1Controller extends Controller
             'description' => 'Pixelfed - Photo sharing for everyone',
             'email' => config('instance.email'),
             'languages' => ['en'],
-            'max_toot_chars' => config('pixelfed.max_caption_length'),
+            'max_toot_chars' => (int) config('pixelfed.max_caption_length'),
             'registrations' => config('pixelfed.open_registration'),
             'stats' => [
                 'user_count' => 0,
@@ -951,11 +951,11 @@ class ApiV1Controller extends Controller
             'urls' => [],
             'version' => '2.7.2 (compatible; Pixelfed ' . config('pixelfed.version') . ')',
             'environment' => [
-                'max_photo_size' => config('pixelfed.max_photo_size'),
-                'max_avatar_size' => config('pixelfed.max_avatar_size'),
-                'max_caption_length' => config('pixelfed.max_caption_length'),
-                'max_bio_length' => config('pixelfed.max_bio_length'),
-                'max_album_length' => config('pixelfed.max_album_length'),
+                'max_photo_size' => (int) config('pixelfed.max_photo_size'),
+                'max_avatar_size' => (int) config('pixelfed.max_avatar_size'),
+                'max_caption_length' => (int) config('pixelfed.max_caption_length'),
+                'max_bio_length' => (int) config('pixelfed.max_bio_length'),
+                'max_album_length' => (int) config('pixelfed.max_album_length'),
                 'mobile_apis' => config('pixelfed.oauth_enabled')
 
             ]