Merge branch 'main' of ssh://git.homelab.nestor-server.fr:2222/colgora/Mangarr
All checks were successful
Build and Deploy / deploy (push) Successful in 1m46s
All checks were successful
Build and Deploy / deploy (push) Successful in 1m46s
# Conflicts: # src/Domain/Manga/Application/CommandHandler/DeleteChapterHandler.php # src/Domain/Manga/Application/CommandHandler/EditMultipleChaptersHandler.php # src/Domain/Manga/Application/EventListener/ChapterImportedEventListener.php # src/Domain/Manga/Application/EventListener/VolumeImportedEventListener.php # src/Domain/Manga/Application/Response/ChapterResponse.php # src/Domain/Manga/Infrastructure/ApiPlatform/State/Provider/DeleteCbzProvider.php # src/Domain/Manga/Infrastructure/ApiPlatform/State/Provider/DeleteChapterProvider.php # src/Domain/Manga/Infrastructure/Persistence/Repository/LegacyChapterRepository.php
This commit is contained in:
@@ -4,7 +4,7 @@ namespace App\Domain\Manga\Infrastructure\ApiPlatform\State\Provider;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProviderInterface;
|
||||
use App\Domain\Manga\Domain\Contract\Repository\ChapterRepositoryInterface;
|
||||
use App\Domain\Manga\Domain\Contract\Repository\MangaRepositoryInterface;
|
||||
use App\Domain\Manga\Domain\Exception\ChapterNotFoundException;
|
||||
use App\Domain\Manga\Domain\Exception\CbzFileNotFoundException;
|
||||
use App\Domain\Manga\Infrastructure\ApiPlatform\Resource\DeleteCbzResource;
|
||||
@@ -13,7 +13,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
readonly class DeleteCbzProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private ChapterRepositoryInterface $chapterRepository
|
||||
private MangaRepositoryInterface $mangaRepository
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ readonly class DeleteCbzProvider implements ProviderInterface
|
||||
$chapterId = $uriVariables['id'];
|
||||
|
||||
try {
|
||||
$chapter = $this->chapterRepository->findVisibleById($chapterId);
|
||||
$chapter = $this->mangaRepository->findVisibleChapterById($chapterId);
|
||||
|
||||
if (!$chapter) {
|
||||
throw new ChapterNotFoundException($chapterId);
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace App\Domain\Manga\Infrastructure\ApiPlatform\State\Provider;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProviderInterface;
|
||||
use App\Domain\Manga\Domain\Contract\Repository\ChapterRepositoryInterface;
|
||||
use App\Domain\Manga\Domain\Contract\Repository\MangaRepositoryInterface;
|
||||
use App\Domain\Manga\Domain\Exception\ChapterNotFoundException;
|
||||
use App\Domain\Manga\Infrastructure\ApiPlatform\Resource\DeleteChapterResource;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
@@ -12,7 +12,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
readonly class DeleteChapterProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private ChapterRepositoryInterface $chapterRepository
|
||||
private MangaRepositoryInterface $mangaRepository
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ readonly class DeleteChapterProvider implements ProviderInterface
|
||||
$chapterId = $uriVariables['id'];
|
||||
|
||||
try {
|
||||
$chapter = $this->chapterRepository->findVisibleById($chapterId);
|
||||
$chapter = $this->mangaRepository->findVisibleChapterById($chapterId);
|
||||
|
||||
if (!$chapter) {
|
||||
throw new ChapterNotFoundException($chapterId);
|
||||
|
||||
@@ -53,8 +53,8 @@ readonly class GetMangaChaptersStateProvider implements ProviderInterface
|
||||
title: $chapter->title,
|
||||
volume: $chapter->volume,
|
||||
isVisible: $chapter->isVisible,
|
||||
isAvailable: $chapter->cbzPath !== null,
|
||||
createdAt: $chapter->createdAt->format(\DateTimeInterface::RFC3339)
|
||||
isAvailable: $chapter->pagesDirectory !== null,
|
||||
createdAt: $chapter->createdAt
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user