diff --git a/server/controllers/static.js b/server/controllers/static.js index 8d317d3..9c96d8e 100644 --- a/server/controllers/static.js +++ b/server/controllers/static.js @@ -2,14 +2,18 @@ var router = require("express").Router(); -router.get("/", function (req, res) { - if (req.error){ +var handleRequest = function(req, res) { + if (req.error) { console.warn(req.error); - } - else { - // public/views/index.html + } else { res.status(200).render("index.html"); } -}); +}; + +router.get("/", handleRequest); +router.get("/game-history", handleRequest); +router.get("/player-stats", handleRequest); +router.get("/input-score", handleRequest); +router.get("/user/:id", handleRequest); module.exports = router; \ No newline at end of file