feat: Ajout d'un endpoint getBySlug
This commit is contained in:
parent
504c62c155
commit
30d26f530d
@@ -53,6 +53,14 @@ readonly class LegacyMangaRepository implements MangaRepositoryInterface
|
||||
return $entity ? $this->toDomain($entity) : null;
|
||||
}
|
||||
|
||||
public function findBySlug(MangaSlug $slug): ?DomainManga
|
||||
{
|
||||
$entity = $this->entityManager->getRepository(EntityManga::class)
|
||||
->findOneBy(['slug' => $slug->getValue()]);
|
||||
|
||||
return $entity ? $this->toDomain($entity) : null;
|
||||
}
|
||||
|
||||
public function save(DomainManga $manga): void
|
||||
{
|
||||
$entity = new EntityManga();
|
||||
|
||||
Reference in New Issue
Block a user