瀏覽代碼

Add some elements in api/v1/instance

Thomas 5 年之前
父節點
當前提交
2a849be650
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      app/Http/Controllers/Api/ApiV1Controller.php

+ 8 - 1
app/Http/Controllers/Api/ApiV1Controller.php

@@ -900,7 +900,14 @@ class ApiV1Controller extends Controller
             'title' => 'Pixelfed (' . config('pixelfed.domain.app') . ')',
             'title' => 'Pixelfed (' . config('pixelfed.domain.app') . ')',
             'uri' => config('app.url'),
             'uri' => config('app.url'),
             'urls' => [],
             'urls' => [],
-            'version' => '2.7.2 (compatible; Pixelfed ' . config('pixelfed.version') . ')'
+            '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')
+            ]
         ];
         ];
         return response()->json($res, 200, [], JSON_PRETTY_PRINT);
         return response()->json($res, 200, [], JSON_PRETTY_PRINT);
     }
     }