Update some api calls based on api changes
This commit is contained in:
parent
d93d22f7df
commit
372b616101
@ -220,7 +220,7 @@ class Model {
|
||||
// 'anime' => 'slug,name,canonicalTitle',
|
||||
'characters' => 'slug,name,image'
|
||||
],
|
||||
'include' => 'waifu,pinnedPost,blocks,linkedAccounts,profileLinks,profileLinks.profileLinkSite,mediaFollows,userRoles,favorites.item'
|
||||
'include' => 'waifu,pinnedPost,blocks,linkedAccounts,profileLinks,profileLinks.profileLinkSite,userRoles,favorites.item'
|
||||
]
|
||||
]);
|
||||
|
||||
@ -878,8 +878,8 @@ class Model {
|
||||
'characters' => 'slug,name,image'
|
||||
],
|
||||
'include' => ($type === 'anime')
|
||||
? 'genres,mappings,streamingLinks,animeCharacters.character'
|
||||
: 'genres,mappings,mangaCharacters.character,castings.character',
|
||||
? 'categories,mappings,streamingLinks,animeCharacters.character'
|
||||
: 'categories,mappings,mangaCharacters.character,castings.character',
|
||||
]
|
||||
];
|
||||
|
||||
|
@ -33,8 +33,10 @@ class AnimeTransformer extends AbstractTransformer {
|
||||
*/
|
||||
public function transform($item)
|
||||
{
|
||||
|
||||
$item['included'] = JsonAPI::organizeIncludes($item['included']);
|
||||
$item['genres'] = array_column($item['included']['genres'], 'name') ?? [];
|
||||
$genres = $item['included']['categories'] ?? [];
|
||||
$item['genres'] = array_column($genres, 'title') ?? [];
|
||||
sort($item['genres']);
|
||||
|
||||
$titles = Kitsu::filterTitles($item);
|
||||
|
Loading…
Reference in New Issue
Block a user