Version 5.1 - All the GraphQL #32
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"source": {
|
|
||||||
"directories": [
|
|
||||||
"src"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"timeout": 10,
|
|
||||||
"logs": {
|
|
||||||
"text": "build\/humbuglog.txt",
|
|
||||||
"json": "build\/humbug.json"
|
|
||||||
}
|
|
||||||
}
|
|
@ -285,7 +285,7 @@ class Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$transformed = $this->animeTransformer->transform($baseData);
|
$transformed = $this->animeTransformer->transform($baseData);
|
||||||
$transformed['included'] = $baseData['included'];
|
$transformed['included'] = JsonAPI::organizeIncluded($baseData['included']);
|
||||||
return $transformed;
|
return $transformed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,9 +44,7 @@ class AnimeListTransformer extends AbstractTransformer {
|
|||||||
{
|
{
|
||||||
$map = [
|
$map = [
|
||||||
'id' => $item['mal_id'],
|
'id' => $item['mal_id'],
|
||||||
'data' => [
|
'data' => []
|
||||||
'episode' => $item['data']['progress']
|
|
||||||
]
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$data =& $item['data'];
|
$data =& $item['data'];
|
||||||
@ -55,6 +53,10 @@ class AnimeListTransformer extends AbstractTransformer {
|
|||||||
{
|
{
|
||||||
switch($key)
|
switch($key)
|
||||||
{
|
{
|
||||||
|
case 'progress':
|
||||||
|
$map['data']['episode'] = $value;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'notes':
|
case 'notes':
|
||||||
$map['data']['comments'] = $value;
|
$map['data']['comments'] = $value;
|
||||||
break;
|
break;
|
||||||
|
@ -280,11 +280,11 @@ class Anime extends BaseController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($data['included'] as $included)
|
if (array_key_exists('characters', $data['included']))
|
||||||
{
|
{
|
||||||
if ($included['type'] === 'characters')
|
foreach($data['included']['characters'] as $id => $character)
|
||||||
{
|
{
|
||||||
$characters[$included['id']] = $included['attributes'];
|
$characters[$id] = $character['attributes'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user