Updated task model to allow setting streak (#7306)

This commit is contained in:
Keith Holliday
2016-05-16 13:12:46 -05:00
committed by Matteo Pagliazzi
parent cfb5e2be60
commit dbd6daeca0
2 changed files with 2 additions and 4 deletions

View File

@@ -56,7 +56,7 @@ export let TaskSchema = new Schema({
}, discriminatorOptions));
TaskSchema.plugin(baseModel, {
noSet: ['challenge', 'userId', 'completed', 'history', 'streak', 'dateCompleted', 'completed'],
noSet: ['challenge', 'userId', 'completed', 'history', 'dateCompleted', 'completed'],
sanitizeTransform (taskObj) {
if (taskObj.type && taskObj.type !== 'reward') { // value should be settable directly only for rewards
delete taskObj.value;