diff --git a/app/views/collection/add.php b/app/views/collection/add.php
index c5b3742e..61c3a7e1 100644
--- a/app/views/collection/add.php
+++ b/app/views/collection/add.php
@@ -3,6 +3,11 @@
Add Anime to your Collection
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Aviat/AnimeClient/Controller/Manga.php b/src/Aviat/AnimeClient/Controller/Manga.php
index 84cb8a85..e6bc8207 100644
--- a/src/Aviat/AnimeClient/Controller/Manga.php
+++ b/src/Aviat/AnimeClient/Controller/Manga.php
@@ -12,6 +12,7 @@
*/
namespace Aviat\AnimeClient\Controller;
+use Aviat\Ion\Json;
use Aviat\Ion\Di\ContainerInterface;
use Aviat\AnimeClient\Controller;
use Aviat\AnimeClient\Config;
@@ -194,9 +195,9 @@ class Manga extends Controller {
$post_data = $transformer->untransform($post_data);
$full_result = $this->model->update($post_data);
- $result = $full_result['body'];
+ $result = Json::decode((string)$full_result['body']);
- if (array_key_exists('manga', $result))
+ if ($full_result['statusCode'] == 200)
{
$m =& $result['manga'][0];
$title = ( ! empty($m['english_title']))
diff --git a/src/Aviat/AnimeClient/Model/Manga.php b/src/Aviat/AnimeClient/Model/Manga.php
index 609b39ca..26a12c4c 100644
--- a/src/Aviat/AnimeClient/Model/Manga.php
+++ b/src/Aviat/AnimeClient/Model/Manga.php
@@ -50,6 +50,14 @@ class Manga extends API {
*/
protected $base_url = "https://hummingbird.me/";
+ /**
+ * Make an authenticated manga API call
+ *
+ * @param string $type - the HTTP verb
+ * @param string $url
+ * @param string|null $json
+ * @return array
+ */
protected function _manga_api_call($type, $url, $json = NULL)
{
$token = $this->container->get('auth')