Update PublicApiController

This commit is contained in:
Daniel Supernault 2019-11-22 23:00:43 -07:00
parent 0c4d270f02
commit 7311e81382
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -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 ? '>' : '<';