mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-13 22:49:51 -04:00
Merge branch 'master' into production
This commit is contained in:
commit
89a6cf0e5d
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ findRandomSession = (queryParams, callback) ->
|
|||
return callback err, null unless startDate
|
||||
now = new Date()
|
||||
interval = now - startDate
|
||||
cutoff = new Date now - Math.pow(Math.random(), 5) * interval
|
||||
cutoff = new Date now - Math.pow(Math.random(), 3) * interval
|
||||
queryParams.submitDate = $gte: startDate, $lt: cutoff
|
||||
selection = 'team totalScore transpiledCode submittedCodeLanguage teamSpells levelID creatorName creator submitDate'
|
||||
LevelSession.findOne(queryParams).sort(submitDate: -1).select(selection).lean().exec (err, session) ->
|
||||
|
|
Loading…
Reference in a new issue