mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-07 02:25:29 -04:00
Utilizing the new level type property in the level handler.
This commit is contained in:
parent
2f68e64dc5
commit
990a2e34e5
1 changed files with 3 additions and 2 deletions
|
@ -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) =>
|
||||
|
|
Loading…
Add table
Reference in a new issue