From ae92866b21e5b85fc8c0439a5be6f7d777fd9647 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Sat, 7 Dec 2019 15:25:14 -0600 Subject: Clean up routing, add misc --- src/server.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server.js') diff --git a/src/server.js b/src/server.js index b3a39bd..72cc417 100644 --- a/src/server.js +++ b/src/server.js @@ -97,7 +97,7 @@ function setUpRoutes(models, jwtFunctions, database) { server.get('/tags', (req, res) => res.sendFile(__dirname + "/html/tags.html")); server.get('/feed', (req, res) => res.sendFile(__dirname + "/html/feed.html")); server.get('/essay', (req, res) => res.sendFile(__dirname + "/html/essay.html")); - server.get('/snake', (req, res) => res.sendFile(__dirname + "/html/snake.html")); + server.get('/misc', (req, res) => res.sendFile(__dirname + "/html/misc.html")); server.get('/word-square', (req, res) => res.sendFile(__dirname + "/html/word-square.html")); server.get('/chess', (req, res) => res.sendFile(__dirname + "/html/chess.html")); server.get('/admin/chess', async (req, res, next) => res.sendFile(__dirname + "/html/chess.html")); @@ -127,9 +127,9 @@ function setUpRoutes(models, jwtFunctions, database) { //var game = await database.query("select * from chessgames where name = '"+name+"'", { type: database.QueryTypes.SELECT }) res.status(200).send({game:game}); }) - server.get('/setScore', (req, res) => { - request(`http://localhost:8000?${req.url.split("?")[1]}`, function (error, response, body) { - }); + server.get('/admin/emails', async (req, res, next) => { + var emails = await models.emails.findAll(); + res.status(200).send(emails); }) server.get('/admin/stats', async (req, res, next) => { try { -- cgit v1.2.3