Fix null error on updating Anime or Manga

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

View File

@ -228,7 +228,7 @@ final class Anime extends BaseController {
$postData = $transformer->untransform($data);
$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->cache->clear();
@ -302,8 +302,6 @@ final class Anime extends BaseController {
* View details of an anime
*
* @param string $id
* @throws ContainerException
* @throws NotFoundException
* @throws InvalidArgumentException
* @return void
*/

View File

@ -64,8 +64,6 @@ final class Manga extends Controller {
*
* @param string $status
* @param string $view
* @throws ContainerException
* @throws NotFoundException
* @throws InvalidArgumentException
* @return void
*/
@ -229,7 +227,7 @@ final class Manga extends Controller {
$post_data = $transformer->untransform($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->cache->clear();
@ -298,8 +296,6 @@ final class Manga extends Controller {
* View details of an manga
*
* @param string $id
* @throws ContainerException
* @throws NotFoundException
* @throws InvalidArgumentException
* @throws Throwable
* @return void
@ -331,8 +327,6 @@ final class Manga extends Controller {
/**
* View details of a random manga
*
* @throws ContainerException
* @throws NotFoundException
* @throws InvalidArgumentException
* @throws Throwable
* @return void