Add and delete manga simulaneously from kitsu and mal

This commit is contained in:
Timothy Warren 2017-03-29 14:25:03 -04:00
parent 528deae789
commit 88c65dd0df
2 changed files with 4 additions and 13 deletions

View File

@ -694,7 +694,7 @@ class Model {
foreach($mappings as $map)
{
if ($map['externalSite'] === 'myanimelist/anime')
if ($map['externalSite'] === 'myanimelist/manga')
{
return $map['externalId'];
}

View File

@ -98,17 +98,7 @@ class Manga extends Controller {
*/
public function addForm()
{
$raw_status_list = MangaReadingStatus::getConstList();
$statuses = [];
foreach ($raw_status_list as $status_item)
{
$statuses[$status_item] = (string)$this->string($status_item)
->underscored()
->humanize()
->titleize();
}
$statuses = MangaReadingStatus::KITSU_TO_TITLE;
$this->setSessionRedirect();
$this->outputHTML('manga/add', [
@ -245,7 +235,8 @@ class Manga extends Controller {
{
$body = $this->request->getParsedBody();
$id = $body['id'];
$response = $this->model->deleteLibraryItem($id);
$malId = $body['mal_id'];
$response = $this->model->deleteLibraryItem($id, $malId);
if ($response)
{