|
|
|
|
@ -673,6 +673,8 @@ class PublicApiController extends Controller
|
|
|
|
|
'pinned' => 'nullable',
|
|
|
|
|
'exclude_replies' => 'nullable',
|
|
|
|
|
'limit' => 'nullable|integer|min:1|max:24',
|
|
|
|
|
'max_id' => 'nullable|integer|min:0|max:'.PHP_INT_MAX,
|
|
|
|
|
'min_id' => 'nullable|integer|min:0|max:'.PHP_INT_MAX,
|
|
|
|
|
'cursor' => 'nullable',
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
@ -718,6 +720,8 @@ class PublicApiController extends Controller
|
|
|
|
|
->when($pinned, function ($query) {
|
|
|
|
|
return $query->whereNull('pinned_order');
|
|
|
|
|
})
|
|
|
|
|
->when($request->max_id, fn ($query, $max_id) => $query->where('id', '<', $max_id))
|
|
|
|
|
->when($request->min_id, fn ($query, $min_id) => $query->where('id', '>', $min_id))
|
|
|
|
|
->whereIn('type', $scope)
|
|
|
|
|
->whereIn('scope', $visibility)
|
|
|
|
|
->orderByDesc('created_at')
|
|
|
|
|
|