feat: endpoint pour la création d'un manga directement via l'api
This commit is contained in:
parent
4017cabff2
commit
3dc0a0b406
@@ -56,6 +56,10 @@ readonly class LegacyMangaRepository implements MangaRepositoryInterface
|
||||
public function save(DomainManga $manga): void
|
||||
{
|
||||
$entity = new EntityManga();
|
||||
|
||||
$imageUrls = $manga->getImageUrls();
|
||||
$fullImageUrl = $imageUrls?->getFull();
|
||||
$thumbnailUrl = $imageUrls?->getThumbnail();
|
||||
|
||||
$entity->setTitle($manga->getTitle()->getValue())
|
||||
->setSlug($manga->getSlug()->getValue())
|
||||
@@ -65,8 +69,8 @@ readonly class LegacyMangaRepository implements MangaRepositoryInterface
|
||||
->setGenres($manga->getGenres())
|
||||
->setStatus($manga->getStatus())
|
||||
->setExternalId($manga->getExternalId()->getValue())
|
||||
->setImageUrl($manga->getImageUrls()->getFull())
|
||||
->setThumbnailUrl($manga->getImageUrls()->getThumbnail())
|
||||
->setImageUrl($fullImageUrl ?? null)
|
||||
->setThumbnailUrl($thumbnailUrl ?? null)
|
||||
->setMonitored(false);
|
||||
|
||||
if ($manga->getRating() !== null) {
|
||||
|
||||
Reference in New Issue
Block a user