mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +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)) : [];
|
||||
if($max == 0) {
|
||||
$res = PublicTimelineService::count();
|
||||
if($res == 0) {
|
||||
PublicTimelineService::warmCache();
|
||||
$res = PublicTimelineService::get(0,4);
|
||||
} else {
|
||||
$res = PublicTimelineService::get(0,4);
|
||||
}
|
||||
return response()->json($res);
|
||||
}
|
||||
// if($max == 0) {
|
||||
// $res = PublicTimelineService::count();
|
||||
// if($res == 0) {
|
||||
// PublicTimelineService::warmCache();
|
||||
// $res = PublicTimelineService::get(0,4);
|
||||
// } else {
|
||||
// $res = PublicTimelineService::get(0,4);
|
||||
// }
|
||||
// return response()->json($res);
|
||||
// }
|
||||
|
||||
if($min || $max) {
|
||||
$dir = $min ? '>' : '<';
|
||||
|
|
Loading…
Reference in a new issue