refactor search a little and add much better testing

This commit is contained in:
Shish
2023-12-14 16:33:21 +00:00
committed by Shish
parent df0a8c28d9
commit a5c6f1321b
23 changed files with 902 additions and 601 deletions

View File

@ -420,7 +420,7 @@ class OuroborosAPI extends Extension
protected function postIndex(int $limit, int $page, array $tags)
{
$start = ($page - 1) * $limit;
$results = Image::find_images(max($start, 0), min($limit, 100), $tags);
$results = Search::find_images(max($start, 0), min($limit, 100), $tags);
$posts = [];
foreach ($results as $img) {
if (!is_object($img)) {