Updated level session schema to contain scoring metrics

This commit is contained in:
Michael Schmatz 2014-02-07 14:29:20 -08:00
parent ecf578ad3c
commit f87d25c192
2 changed files with 4 additions and 0 deletions

View file

@ -57,6 +57,9 @@ _.extend LevelSessionSchema.properties,
players: { type: 'object' }
chat: { type: 'array' }
meanStrength: {type: 'number', default: 25}
standardDeviation: {type:'number', default:25/3, minimum: 0}
totalScore: {type: 'number'}
c.extendBasicProperties LevelSessionSchema, 'level.session'

View file

@ -33,6 +33,7 @@ module.exports.dispatchTaskToConsumer = (req, res) ->
messageBody = parseTaskQueueMessage req, res, message
return errors.serverError res, "There was an error parsing the queue message" unless messageBody?
#Create task record here in database
constructTaskObject messageBody, (taskConstructionError, taskObject) ->
return errors.serverError res, "There was an error constructing the scoring task" if taskConstructionError?