Utilizing the new level type property in the level handler.

This commit is contained in:
Scott Erickson 2014-03-07 15:15:49 -08:00
parent 2f68e64dc5
commit 990a2e34e5

View file

@ -49,10 +49,11 @@ LevelHandler = class LevelHandler extends Handler
majorVersion: level.version.major
creator: req.user.id
# TODO: generalize this for levels that need teams
if req.query.team?
sessionQuery.team = req.query.team
else if level.name is 'Project DotA'
# TODO: generalize this for levels based on their teams
else if level.get('type') is 'ladder'
sessionQuery.team = 'humans'
Session.findOne(sessionQuery).exec (err, doc) =>