mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-11 14:40:46 +00:00
Update ApiController
This commit is contained in:
parent
295ee0d8f7
commit
b2d873a22c
1 changed files with 2 additions and 28 deletions
|
@ -10,6 +10,7 @@ use App\{
|
|||
UserFilter
|
||||
};
|
||||
use Auth, Cache, Redis;
|
||||
use App\Util\Site\Config;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\SuggestionService;
|
||||
|
||||
|
@ -23,34 +24,7 @@ class ApiController extends BaseApiController
|
|||
|
||||
public function siteConfiguration(Request $request)
|
||||
{
|
||||
$res = Cache::remember('api:site:configuration', now()->addMinutes(30), function() {
|
||||
return [
|
||||
'uploader' => [
|
||||
'max_photo_size' => config('pixelfed.max_photo_size'),
|
||||
'max_caption_length' => config('pixelfed.max_caption_length'),
|
||||
'album_limit' => config('pixelfed.max_album_length'),
|
||||
'image_quality' => config('pixelfed.image_quality'),
|
||||
|
||||
'optimize_image' => config('pixelfed.optimize_image'),
|
||||
'optimize_video' => config('pixelfed.optimize_video'),
|
||||
|
||||
'media_types' => config('pixelfed.media_types'),
|
||||
'enforce_account_limit' => config('pixelfed.enforce_account_limit')
|
||||
],
|
||||
|
||||
'activitypub' => [
|
||||
'enabled' => config('federation.activitypub.enabled'),
|
||||
'remote_follow' => config('federation.activitypub.remoteFollow')
|
||||
],
|
||||
|
||||
'ab' => [
|
||||
'lc' => config('exp.lc'),
|
||||
'rec' => config('exp.rec'),
|
||||
'loops' => config('exp.loops')
|
||||
],
|
||||
];
|
||||
});
|
||||
return response()->json($res);
|
||||
return response()->json(Config::get());
|
||||
}
|
||||
|
||||
public function userRecommendations(Request $request)
|
||||
|
|
Loading…
Reference in a new issue