diff --git a/src/Command/CreateProductionCommand.php b/src/Command/CreateProductionCommand.php index 52ba6d2..de3919f 100644 --- a/src/Command/CreateProductionCommand.php +++ b/src/Command/CreateProductionCommand.php @@ -84,7 +84,7 @@ class CreateProductionCommand extends Command $sNote = $this->ankiService->getNote($noteIds[array_key_last($noteIds)]); $newSlNote = SentenceListeningNote::fromNote($sNote, $term); - if (!$this->ankiService->addNote($newSlNote, 'production')) { + if (!$this->ankiService->addNote($newSlNote, SentenceListeningNote::DECK)) { throw new \Exception('Failed to add note!'); } } diff --git a/src/Entity/SentenceListeningNote.php b/src/Entity/SentenceListeningNote.php index d9da009..e269f49 100644 --- a/src/Entity/SentenceListeningNote.php +++ b/src/Entity/SentenceListeningNote.php @@ -5,6 +5,7 @@ namespace App\Entity; class SentenceListeningNote extends Note { const MODEL_NAME = 'Japanese sentences listening'; + const DECK = 'jp::production'; private ?array $mediaInfo = []; private ?Term $term = null; diff --git a/src/Entity/UnicodeNote.php b/src/Entity/UnicodeNote.php index 121260a..58f9026 100644 --- a/src/Entity/UnicodeNote.php +++ b/src/Entity/UnicodeNote.php @@ -7,7 +7,7 @@ use App\Utils\Number; class UnicodeNote extends Note { const string MODEL_NAME = 'Unicode'; - const string DECK = 'unicode'; + const string DECK = 'jp::unicode'; private ?int $codepoint = null; /** @var Term[] */ diff --git a/src/Service/AnkiService.php b/src/Service/AnkiService.php index 86b9676..a64d081 100644 --- a/src/Service/AnkiService.php +++ b/src/Service/AnkiService.php @@ -41,7 +41,7 @@ class AnkiService public function addNote(Note &$note, string $deckName): bool { $note->setId($this->request('addNote', ['note' => [ - 'deckName' => $deckName, + 'deckName' => $deckName, 'modelName' => $note->getModel(), 'fields' => $note->getFields(), 'options' => ['allowDuplicate' => false],