Make Branding Config return in the API to take advantage of updated JSON serialization.

This commit is contained in:
Buster Neece 2024-04-25 12:48:53 -05:00
parent 1a68f34452
commit a1cd71922f
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@ declare(strict_types=1);
namespace App\Entity\Api;
use App\Entity\Api\Traits\HasLinks;
use App\Entity\PodcastBrandingConfiguration;
use OpenApi\Attributes as OA;
#[OA\Schema(
@ -50,7 +51,7 @@ final class Podcast
type: "array",
items: new OA\Items()
)]
public array $branding_config;
public PodcastBrandingConfiguration $branding_config;
#[OA\Property]
public string $language;

View File

@ -50,7 +50,7 @@ final class PodcastApiGenerator
$return->is_enabled = $record->isEnabled();
$return->branding_config = $record->getBrandingConfig()->toArray();
$return->branding_config = $record->getBrandingConfig();
$return->language = $record->getLanguage();
try {