chore: rattrapage

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2026-03-14 00:45:29 +01:00
parent 8e1c4637ba
commit 7fba3c6fcb
14 changed files with 87 additions and 23 deletions

View File

@@ -24,11 +24,21 @@ readonly class GetMangaListHandler
$total = $this->mangaRepository->count();
$chapterCounts = [];
foreach ($mangas as $manga) {
$id = $manga->getId()->getValue();
$chapterCounts[$id] = [
'total' => $this->mangaRepository->countChapters($id),
'scraped' => $this->mangaRepository->countAvailableChapters($id),
];
}
return new MangaListResponse(
mangas: $mangas,
total: $total,
page: $query->page,
limit: $query->limit
limit: $query->limit,
chapterCounts: $chapterCounts
);
}
}