mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 22:13:32 -04:00
Fix selection
This commit is contained in:
parent
7bc4a0451c
commit
d59c163493
1 changed files with 4 additions and 1 deletions
|
@ -134,7 +134,7 @@ module.exports.getTwoGames = (req, res) ->
|
|||
"levelID":"greed"
|
||||
"submitted":true
|
||||
"team":"humans"
|
||||
selection = "team totalScore transpiledCode teamSpells levelID creatorName creator"
|
||||
selection = "team totalScore transpiledCode teamSpells levelID creatorName creator submitDate"
|
||||
LevelSession.count queryParams, (err, numberOfHumans) =>
|
||||
if err? then return errors.serverError(res, "Couldn't get the number of human games")
|
||||
humanSkipCount = selectRandomSkipIndex(numberOfHumans)
|
||||
|
@ -495,6 +495,8 @@ deleteQueueMessage = (callback) ->
|
|||
fetchLevelSession = (callback) ->
|
||||
findParameters =
|
||||
_id: @clientResponseObject.originalSessionID
|
||||
console.log "Find parameters are",findParameters
|
||||
|
||||
query = LevelSession
|
||||
.findOne(findParameters)
|
||||
.lean()
|
||||
|
@ -589,6 +591,7 @@ updateMatchesInSession = (matchObject, sessionID, callback) ->
|
|||
opponentsArray = _.toArray opponentsClone
|
||||
currentMatchObject.opponents = opponentsArray
|
||||
LevelSession.findOne {"_id": sessionID}, (err, session) ->
|
||||
console.log "Updated session #{sessionID}"
|
||||
session = session.toObject()
|
||||
currentMatchObject.playtime = session.playtime ? 0
|
||||
sessionUpdateObject =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue