Skip to content

Commit

Permalink
🏇 #103 updated express routes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmcfad committed Jun 22, 2015
1 parent 27f2d76 commit 548f518
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions server/controllers/static.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 548f518

Please sign in to comment.