mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 22:41:27 +00:00
Update ApiController
This commit is contained in:
parent
9bf5662dd9
commit
1de3f0ce24
1 changed files with 19 additions and 14 deletions
|
@ -13,23 +13,28 @@ class ApiController extends BaseApiController
|
||||||
// todo: deprecate and remove
|
// todo: deprecate and remove
|
||||||
public function hydrateLikes(Request $request)
|
public function hydrateLikes(Request $request)
|
||||||
{
|
{
|
||||||
$this->validate($request, [
|
return response()->json([]);
|
||||||
'min' => 'nullable|integer|min:1',
|
}
|
||||||
'max' => 'nullable|integer',
|
|
||||||
]);
|
|
||||||
|
|
||||||
$profile = Auth::user()->profile;
|
public function siteConfiguration(Request $request)
|
||||||
$res = Cache::remember('api:like-ids:user:'.$profile->id, now()->addDays(1), function () use ($profile) {
|
{
|
||||||
return Like::whereProfileId($profile->id)
|
$res = Cache::remember('api:site:configuration', now()->addMinutes(30), function() {
|
||||||
->orderBy('id', 'desc')
|
return [
|
||||||
->take(1000)
|
'uploader' => [
|
||||||
->pluck('status_id');
|
'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')
|
||||||
|
]
|
||||||
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
return response()->json($res);
|
return response()->json($res);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadMoreComments(Request $request)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue