From a7ecfc5d1eeabaa26acd1678bd657c901be65e87 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sun, 3 Dec 2017 00:50:05 -0500 Subject: [PATCH] Send the correct raw TTS json when the TTS output button is pressed --- js/editor.js | 2 +- server.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/js/editor.js b/js/editor.js index be37ba6..8b15bcb 100644 --- a/js/editor.js +++ b/js/editor.js @@ -42,7 +42,7 @@ window.addEventListener("load", () => { // download input JSON document.querySelector('#outputDownload').addEventListener( 'click', - () => downloadFile('deck.json', + () => downloadFile('deck.tts.json', deckName + '.json')); diff --git a/server.js b/server.js index 0499a9c..eb2de2c 100644 --- a/server.js +++ b/server.js @@ -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;