Skip to content

Commit

Permalink
Work on the createteam page
Browse files Browse the repository at this point in the history
  • Loading branch information
xzion committed Jul 18, 2014
1 parent 424637c commit 27808f3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
21 changes: 21 additions & 0 deletions routes/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,27 @@ router.get('/createteam', checkAuth, function(req, res) {
// Local DB
var db = req.db;

db.smembers("game:dota2:regions", function(err, reply) {
req.session.games = {
"dota2" : {
"regions" : reply
}
};

console.log(req.session.game);

res.render('createteam', {
session : req.session,
});
});
});

/* GET - NEW TEAM */
router.post('/createteam', checkAuth, function(req, res) {
// Local DB
var db = req.db;



res.render('createteam', {
session : req.session
Expand Down
7 changes: 4 additions & 3 deletions views/createteam.jade
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ block content
select(name="teamgame")
option(selected="true", value="dota2") Dota 2
br
input#inputUserEmail(type="text", placeholder="Email Address", name="useremail")
br
input#inputUserPass(type="text", placeholder="Password", name="userpass")
| Region:
select(name="gameregion")
each region, i in session.games.dota2.regions
option(value=region)= region
br
button#btnSubmit(type="submit") Submit

0 comments on commit 27808f3

Please sign in to comment.