Send the correct raw TTS json when the TTS output button is pressed

This commit is contained in:
Adam Goldsmith 2017-12-03 00:50:05 -05:00
parent 06d5af2e9e
commit 127394a729
2 changed files with 4 additions and 1 deletions

View File

@ -42,7 +42,7 @@ window.addEventListener("load", () => {
// download input JSON
document.querySelector('#outputDownload').addEventListener(
'click',
() => downloadFile('deck.json',
() => downloadFile('deck.tts.json',
deckName + '.json'));

View File

@ -89,6 +89,9 @@ const server = http.createServer((req, res) => {
case 'deck.json':
sendFileJSON(res, deckName);
break;
case 'deck.tts.json':
sendFile(res, `decks/${deckName}.json`, 'application/json');
break;
case 'deck.input.json':
sendFile(res, `decks/${deckName}.input.json`, 'application/json');
break;