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 4824d2b9a3
commit a7ecfc5d1e
2 changed files with 4 additions and 1 deletions

View File

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

View File

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