Updated level session schema to contain scoring metrics
This commit is contained in:
parent
ecf578ad3c
commit
f87d25c192
2 changed files with 4 additions and 0 deletions
server
|
@ -57,6 +57,9 @@ _.extend LevelSessionSchema.properties,
|
||||||
players: { type: 'object' }
|
players: { type: 'object' }
|
||||||
chat: { type: 'array' }
|
chat: { type: 'array' }
|
||||||
|
|
||||||
|
meanStrength: {type: 'number', default: 25}
|
||||||
|
standardDeviation: {type:'number', default:25/3, minimum: 0}
|
||||||
|
totalScore: {type: 'number'}
|
||||||
|
|
||||||
|
|
||||||
c.extendBasicProperties LevelSessionSchema, 'level.session'
|
c.extendBasicProperties LevelSessionSchema, 'level.session'
|
||||||
|
|
|
@ -33,6 +33,7 @@ module.exports.dispatchTaskToConsumer = (req, res) ->
|
||||||
|
|
||||||
messageBody = parseTaskQueueMessage req, res, message
|
messageBody = parseTaskQueueMessage req, res, message
|
||||||
return errors.serverError res, "There was an error parsing the queue message" unless messageBody?
|
return errors.serverError res, "There was an error parsing the queue message" unless messageBody?
|
||||||
|
#Create task record here in database
|
||||||
|
|
||||||
constructTaskObject messageBody, (taskConstructionError, taskObject) ->
|
constructTaskObject messageBody, (taskConstructionError, taskObject) ->
|
||||||
return errors.serverError res, "There was an error constructing the scoring task" if taskConstructionError?
|
return errors.serverError res, "There was an error constructing the scoring task" if taskConstructionError?
|
||||||
|
|
Reference in a new issue