Version 5.1 - All the GraphQL #32
@ -19,8 +19,7 @@
|
|||||||
<td><?= $escape->html($attributes['waifuOrHusbando']) ?></td>
|
<td><?= $escape->html($attributes['waifuOrHusbando']) ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$dataKey = $relationships['waifu']['id'];
|
$character = $relationships['waifu']['attributes'];
|
||||||
$character = $included['characters'][$dataKey]['attributes'];
|
|
||||||
echo $helper->a(
|
echo $helper->a(
|
||||||
$url->generate('character', ['slug' => $character['slug']]),
|
$url->generate('character', ['slug' => $character['slug']]),
|
||||||
$character['name']
|
$character['name']
|
||||||
|
@ -182,7 +182,18 @@ class JsonAPI {
|
|||||||
{
|
{
|
||||||
if (array_key_exists('data', $block) && is_array($block['data']) && ! empty($block['data']))
|
if (array_key_exists('data', $block) && is_array($block['data']) && ! empty($block['data']))
|
||||||
{
|
{
|
||||||
$output[$key] = $block['data'];
|
$output[$key] = [];
|
||||||
|
if (array_key_exists('type', $block['data']) && array_key_exists('id', $block['data']))
|
||||||
|
{
|
||||||
|
$output[$key] = $includes[$block['data']['type']][$block['data']['id']];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach($block['data'] as $dBlock)
|
||||||
|
{
|
||||||
|
$output[$key][] = $includes[$dBlock['type']][$dBlock['id']];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,6 +71,11 @@ class Controller {
|
|||||||
$this->baseData['message'] = $this->session->getFlash('message');
|
$this->baseData['message'] = $this->session->getFlash('message');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the user profile page
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function me()
|
public function me()
|
||||||
{
|
{
|
||||||
$username = $this->config->get(['kitsu_username']);
|
$username = $this->config->get(['kitsu_username']);
|
||||||
|
Loading…
Reference in New Issue
Block a user