Version 5.1 - All the GraphQL #32

Closed
timw4mail wants to merge 1160 commits from develop into master
2 changed files with 10 additions and 6 deletions
Showing only changes of commit a767c75014 - Show all commits

View File

@ -123,7 +123,7 @@ class AnimeListTransformer extends AbstractTransformer {
]
];
if ( ! empty($item['user_rating']))
if (is_numeric($item['user_rating']))
{
$untransformed['data']['rating'] = $item['user_rating'] / 2;
}

View File

@ -117,10 +117,14 @@ class MangaListTransformer extends AbstractTransformer {
'reconsuming' => $rereading,
'reconsumeCount' => (int)$item['reread_count'],
'notes' => $item['notes'],
'rating' => $item['new_rating'] / 2
],
];
if (is_numeric($item['new_rating']))
{
$map['data']['rating'] = $item['new_rating'] / 2;
}
return $map;
}
}