fix(manga): ChapterResponse.createdAt en string RFC3339
- ChapterResponse expose createdAt comme string formatée (RFC3339) - GetMangaChaptersHandler formate la date à la construction du DTO - GetMangaChaptersStateProvider adapté en conséquence Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2c051351a8
commit
ff451855a7
@@ -39,7 +39,7 @@ readonly class GetMangaChaptersHandler
|
||||
volume: $chapter->getVolume(),
|
||||
isVisible: $chapter->isVisible(),
|
||||
pagesDirectory: $chapter->getPagesDirectory(),
|
||||
createdAt: $chapter->getCreatedAt()
|
||||
createdAt: $chapter->getCreatedAt()->format(\DateTimeInterface::RFC3339)
|
||||
),
|
||||
$chapters
|
||||
),
|
||||
|
||||
@@ -11,6 +11,6 @@ readonly class ChapterResponse
|
||||
public ?int $volume,
|
||||
public bool $isVisible,
|
||||
public ?string $pagesDirectory,
|
||||
public \DateTimeImmutable $createdAt
|
||||
public string $createdAt
|
||||
) {}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ readonly class GetMangaChaptersStateProvider implements ProviderInterface
|
||||
volume: $chapter->volume,
|
||||
isVisible: $chapter->isVisible,
|
||||
isAvailable: $chapter->pagesDirectory !== null,
|
||||
createdAt: $chapter->createdAt->format(\DateTimeInterface::RFC3339)
|
||||
createdAt: $chapter->createdAt
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user