mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 17:02:18 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
e1db304d92
1 changed files with 2 additions and 2 deletions
|
@ -241,11 +241,11 @@ findNearestBetterSessionID = (levelOriginalID, levelMajorVersion, sessionID, ses
|
|||
|
||||
retrieveAllOpponentSessionIDs = (sessionID, cb) ->
|
||||
query = LevelSession.findOne({"_id":sessionID})
|
||||
.select('matches.opponents.sessionID')
|
||||
.select('matches.opponents.sessionID.submitDate')
|
||||
.lean()
|
||||
query.exec (err, session) ->
|
||||
if err? then return cb err, null
|
||||
opponentSessionIDs = (match.opponents[0].sessionID for match in session.matches)
|
||||
opponentSessionIDs = (match.opponents[0].sessionID for match in session.matches when match.date > session.submitDate)
|
||||
cb err, opponentSessionIDs
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue