Correct some errors in creating and deleting anime collection items

This commit is contained in:
Timothy Warren 2017-12-06 12:30:12 -05:00
parent 815bf835d3
commit 1ea3a59b6a
2 changed files with 3 additions and 3 deletions

View File

@ -875,7 +875,7 @@ class Model {
}
$baseData = $data['data']['attributes'];
$baseData['id'] = $data['id'];
$baseData['id'] = $id;
$baseData['included'] = $data['included'];
return $baseData;
}

View File

@ -172,13 +172,13 @@ class AnimeCollection extends BaseController {
$data = $this->request->getParsedBody();
if ( ! array_key_exists('hummingbird_id', $data))
{
$this->redirect("/collection/view", 303);
$this->redirect("/anime-collection/view", 303);
}
$this->animeCollectionModel->delete($data);
$this->setFlashMessage("Successfully removed anime from collection.", 'success');
$this->redirect("/collection/view", 303);
$this->redirect("/anime-collection/view", 303);
}
}
// End of CollectionController.php