Correct some errors in creating and deleting anime collection items
This commit is contained in:
parent
034174418b
commit
55fca3f92f
@ -875,7 +875,7 @@ class Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$baseData = $data['data']['attributes'];
|
$baseData = $data['data']['attributes'];
|
||||||
$baseData['id'] = $data['id'];
|
$baseData['id'] = $id;
|
||||||
$baseData['included'] = $data['included'];
|
$baseData['included'] = $data['included'];
|
||||||
return $baseData;
|
return $baseData;
|
||||||
}
|
}
|
||||||
|
@ -172,13 +172,13 @@ class AnimeCollection extends BaseController {
|
|||||||
$data = $this->request->getParsedBody();
|
$data = $this->request->getParsedBody();
|
||||||
if ( ! array_key_exists('hummingbird_id', $data))
|
if ( ! array_key_exists('hummingbird_id', $data))
|
||||||
{
|
{
|
||||||
$this->redirect("/collection/view", 303);
|
$this->redirect("/anime-collection/view", 303);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->animeCollectionModel->delete($data);
|
$this->animeCollectionModel->delete($data);
|
||||||
$this->setFlashMessage("Successfully removed anime from collection.", 'success');
|
$this->setFlashMessage("Successfully removed anime from collection.", 'success');
|
||||||
|
|
||||||
$this->redirect("/collection/view", 303);
|
$this->redirect("/anime-collection/view", 303);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// End of CollectionController.php
|
// End of CollectionController.php
|
Loading…
Reference in New Issue
Block a user