mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 22:41:27 +00:00
Update PublicApiController
This commit is contained in:
parent
0c4d270f02
commit
7311e81382
1 changed files with 10 additions and 10 deletions
|
@ -256,16 +256,16 @@ class PublicApiController extends Controller
|
||||||
// }
|
// }
|
||||||
|
|
||||||
$filtered = Auth::check() ? array_merge($private, UserFilterService::filters(Auth::user()->profile_id)) : [];
|
$filtered = Auth::check() ? array_merge($private, UserFilterService::filters(Auth::user()->profile_id)) : [];
|
||||||
if($max == 0) {
|
// if($max == 0) {
|
||||||
$res = PublicTimelineService::count();
|
// $res = PublicTimelineService::count();
|
||||||
if($res == 0) {
|
// if($res == 0) {
|
||||||
PublicTimelineService::warmCache();
|
// PublicTimelineService::warmCache();
|
||||||
$res = PublicTimelineService::get(0,4);
|
// $res = PublicTimelineService::get(0,4);
|
||||||
} else {
|
// } else {
|
||||||
$res = PublicTimelineService::get(0,4);
|
// $res = PublicTimelineService::get(0,4);
|
||||||
}
|
// }
|
||||||
return response()->json($res);
|
// return response()->json($res);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if($min || $max) {
|
if($min || $max) {
|
||||||
$dir = $min ? '>' : '<';
|
$dir = $min ? '>' : '<';
|
||||||
|
|
Loading…
Reference in a new issue