Correct some errors in creating and deleting anime collection items
This commit is contained in:
parent
815bf835d3
commit
1ea3a59b6a
@ -875,7 +875,7 @@ class Model {
|
||||
}
|
||||
|
||||
$baseData = $data['data']['attributes'];
|
||||
$baseData['id'] = $data['id'];
|
||||
$baseData['id'] = $id;
|
||||
$baseData['included'] = $data['included'];
|
||||
return $baseData;
|
||||
}
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user