Fix null error on updating Anime or Manga
timw4mail/HummingBirdAnimeClient/pipeline/head This commit looks good Details

This commit is contained in:
Timothy Warren 2021-03-01 10:08:36 -05:00
parent eb461e2f2e
commit c624b51acd
2 changed files with 2 additions and 10 deletions

View File

@ -228,7 +228,7 @@ final class Anime extends BaseController {
$postData = $transformer->untransform($data); $postData = $transformer->untransform($data);
$fullResult = $this->model->updateLibraryItem(FormItem::from($postData)); $fullResult = $this->model->updateLibraryItem(FormItem::from($postData));
if ($fullResult['statusCode'] === 200 && $fullResult['body']['error'] === NULL) if ($fullResult['statusCode'] === 200)
{ {
$this->setFlashMessage('Successfully updated.', 'success'); $this->setFlashMessage('Successfully updated.', 'success');
$this->cache->clear(); $this->cache->clear();
@ -302,8 +302,6 @@ final class Anime extends BaseController {
* View details of an anime * View details of an anime
* *
* @param string $id * @param string $id
* @throws ContainerException
* @throws NotFoundException
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @return void * @return void
*/ */

View File

@ -64,8 +64,6 @@ final class Manga extends Controller {
* *
* @param string $status * @param string $status
* @param string $view * @param string $view
* @throws ContainerException
* @throws NotFoundException
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @return void * @return void
*/ */
@ -229,7 +227,7 @@ final class Manga extends Controller {
$post_data = $transformer->untransform($data); $post_data = $transformer->untransform($data);
$full_result = $this->model->updateLibraryItem(FormItem::from($post_data)); $full_result = $this->model->updateLibraryItem(FormItem::from($post_data));
if ($full_result['statusCode'] === 200 && $full_result['body']['error'] === NULL) if ($full_result['statusCode'] === 200)
{ {
$this->setFlashMessage('Successfully updated manga.', 'success'); $this->setFlashMessage('Successfully updated manga.', 'success');
$this->cache->clear(); $this->cache->clear();
@ -298,8 +296,6 @@ final class Manga extends Controller {
* View details of an manga * View details of an manga
* *
* @param string $id * @param string $id
* @throws ContainerException
* @throws NotFoundException
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @throws Throwable * @throws Throwable
* @return void * @return void
@ -331,8 +327,6 @@ final class Manga extends Controller {
/** /**
* View details of a random manga * View details of a random manga
* *
* @throws ContainerException
* @throws NotFoundException
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @throws Throwable * @throws Throwable
* @return void * @return void