feat: ajout de la fonctionnalité de suppression des chapitres avec mise à jour de l'API et des composants associés pour gérer la suppression des chapitres et des fichiers CBZ.
This commit is contained in:
parent
37e1b202c2
commit
8692fa14c6
@@ -7,6 +7,8 @@ use App\Domain\Manga\Domain\Contract\Repository\ChapterRepositoryInterface;
|
||||
use App\Domain\Manga\Domain\Contract\Service\FileServiceInterface;
|
||||
use App\Domain\Manga\Domain\Exception\ChapterNotFoundException;
|
||||
use App\Domain\Manga\Domain\Exception\CbzFileNotFoundException;
|
||||
use App\Domain\Manga\Domain\Model\Chapter;
|
||||
use App\Domain\Manga\Domain\Model\ValueObject\ChapterId;
|
||||
use App\Domain\Shared\Domain\Contract\CommandHandlerInterface;
|
||||
use App\Domain\Shared\Domain\Contract\CommandInterface;
|
||||
|
||||
@@ -37,14 +39,14 @@ readonly class DeleteCbzHandler implements CommandHandlerInterface
|
||||
// For now, we'll just mark the chapter as not available
|
||||
|
||||
// Update chapter to mark CBZ as not available
|
||||
$updatedChapter = new \App\Domain\Manga\Domain\Model\Chapter(
|
||||
new \App\Domain\Manga\Domain\Model\ValueObject\ChapterId($chapter->getId()),
|
||||
$updatedChapter = new Chapter(
|
||||
new ChapterId($chapter->getId()),
|
||||
$chapter->getMangaId(),
|
||||
$chapter->getNumber(),
|
||||
$chapter->getTitle(),
|
||||
$chapter->getVolume(),
|
||||
$chapter->isVisible(),
|
||||
false, // isAvailable = false (CBZ removed)
|
||||
null,
|
||||
$chapter->getCreatedAt()
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user