Closed nicodg73 closed 1 week ago
We recently made a change to Jikan lib which changed the type of the broadcast
attribute. However in the db we still have instances where the old version exists, so this fails.
/app/app/Anime.php on line 120
<-- around this line we need a type check whether the value for the broadcast
attribute from the db is the old or the new one. Or we don't need the call to the adaptBroadcastValue
function. :thinking:
Is there an existing issue for this?
Current Behavior
The API has returned an error:
TypeError
Status code:0
Message:App\Anime::adaptBroadcastValue(): Argument #1 ($broadcast) must be of type array|string|null, MongoDB\Model\BSONDocument given, called in /app/app/Anime.php on line 120
Trace:/app/app/Anime.php on line 410
Expected Behavior
The API should have returned a successful response with data.
Steps To Reproduce
Http Request: `GET /v4/random/anime
Environment
Anything else?
My api is in a docker container and got data (i executed the indexer and anime fetching was done).
Get random manga works Get random characters return the same one