feat: ajout de la gestion des commandes pour la suppression des fichiers CBZ et des chapitres, avec création des gestionnaires et des ressources API correspondantes
This commit is contained in:
parent
7fe4ac0d3b
commit
37e1b202c2
@@ -44,6 +44,23 @@ class InMemoryMangaRepository implements MangaRepositoryInterface
|
||||
$this->mangas[$manga->getId()] = $manga;
|
||||
}
|
||||
|
||||
public function updatePreferredSources(string $mangaId, array $sourceIds): void
|
||||
{
|
||||
if (isset($this->mangas[$mangaId])) {
|
||||
$manga = $this->mangas[$mangaId];
|
||||
$updatedManga = new Manga(
|
||||
$manga->getId(),
|
||||
$manga->getTitle(),
|
||||
$manga->getSlug(),
|
||||
$manga->getDescription(),
|
||||
$manga->getAuthor(),
|
||||
$manga->getPublicationYear(),
|
||||
$sourceIds // Mise à jour des sources préférées
|
||||
);
|
||||
$this->mangas[$mangaId] = $updatedManga;
|
||||
}
|
||||
}
|
||||
|
||||
public function clear(): void
|
||||
{
|
||||
$this->mangas = [];
|
||||
|
||||
Reference in New Issue
Block a user