fix: allows user to save an alias and checklistCollapsed properties of a challenge task. fixes #7875 (#8170)

This commit is contained in:
Travis
2016-10-25 19:47:49 -07:00
committed by Blade Barringer
parent d4e20ee4aa
commit 0bfc9d9516
2 changed files with 5 additions and 1 deletions

View File

@@ -119,7 +119,7 @@ TaskSchema.statics.findByIdOrAlias = async function findByIdOrAlias (identifier,
TaskSchema.statics.sanitizeUserChallengeTask = function sanitizeUserChallengeTask (taskObj) {
let initialSanitization = this.sanitize(taskObj);
return _.pick(initialSanitization, ['streak', 'checklist', 'attribute', 'reminders', 'tags', 'notes']);
return _.pick(initialSanitization, ['streak', 'checklist', 'attribute', 'reminders', 'tags', 'notes', 'collapseChecklist', 'alias']);
};
// Sanitize checklist objects (disallowing id)