From 548f518f610b82daae78296b97d4dd679d43e95e Mon Sep 17 00:00:00 2001 From: Matt McFadyen Date: Mon, 22 Jun 2015 15:26:50 -0400 Subject: [PATCH] :horse_racing: #103 updated express routes --- server/controllers/static.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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