From 00c98e2003897749f7d3723f68e02358945e11d9 Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Wed, 23 May 2018 11:33:10 -0400 Subject: [PATCH] working on announce --- webapp/server.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/webapp/server.js b/webapp/server.js index 28f7463..ac16b2b 100644 --- a/webapp/server.js +++ b/webapp/server.js @@ -272,11 +272,19 @@ app.get('/get-players', function (req, res) { res.send(JSON.stringify(players)); }); +var last_announce_string = "none"; + +app.get('/last-announce', function (req, res) { + res.setHeader('Content-Type', 'text/plain'); + res.send(last_announce_string); +}); + app.get('/announce', function (req, res) { - console.log(JSON.stringify(req)); + last_announce_string = JSON.stringify(req); + console.log(last_announce_string); res.setHeader('Content-Type', 'text/plain'); res.send(""); -} +}); app.get('/', function (req, res) { var ret = "";