Version 5.1 - All the GraphQL #32

Closed
timw4mail wants to merge 1160 commits from develop into master
4 changed files with 9 additions and 19 deletions
Showing only changes of commit 59446649f6 - Show all commits

View File

@ -1,12 +0,0 @@
{
"source": {
"directories": [
"src"
]
},
"timeout": 10,
"logs": {
"text": "build\/humbuglog.txt",
"json": "build\/humbug.json"
}
}

View File

@ -285,7 +285,7 @@ class Model {
}
$transformed = $this->animeTransformer->transform($baseData);
$transformed['included'] = $baseData['included'];
$transformed['included'] = JsonAPI::organizeIncluded($baseData['included']);
return $transformed;
}

View File

@ -44,9 +44,7 @@ class AnimeListTransformer extends AbstractTransformer {
{
$map = [
'id' => $item['mal_id'],
'data' => [
'episode' => $item['data']['progress']
]
'data' => []
];
$data =& $item['data'];
@ -55,6 +53,10 @@ class AnimeListTransformer extends AbstractTransformer {
{
switch($key)
{
case 'progress':
$map['data']['episode'] = $value;
break;
case 'notes':
$map['data']['comments'] = $value;
break;

View File

@ -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'];
}
}