aboutsummaryrefslogtreecommitdiff
path: root/src/server.js
diff options
context:
space:
mode:
authorMark Powers <markppowers0@gmail.com>2019-12-07 15:25:14 -0600
committerMark Powers <markppowers0@gmail.com>2019-12-07 15:25:14 -0600
commitae92866b21e5b85fc8c0439a5be6f7d777fd9647 (patch)
treef70edd7e7f11b311a6c9f78e7f4d670b9f799697 /src/server.js
parent1682f89e7d696ddba69bbfcfff791b95fd562df5 (diff)
Clean up routing, add misc
Diffstat (limited to 'src/server.js')
-rw-r--r--src/server.js8
1 files changed, 4 insertions, 4 deletions
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 {