v3: add CHALLENGE_TASK_NOT_FOUND to valid broken reasons

This commit is contained in:
Matteo Pagliazzi
2016-05-15 11:35:10 +02:00
parent 18ce4127e9
commit 64930ea07f

View File

@@ -40,7 +40,7 @@ export let TaskSchema = new Schema({
challenge: {
id: {type: String, ref: 'Challenge', validate: [validator.isUUID, 'Invalid uuid.']}, // When set (and userId not set) it's the original task
taskId: {type: String, ref: 'Task', validate: [validator.isUUID, 'Invalid uuid.']}, // When not set but challenge.id defined it's the original task
broken: {type: String, enum: ['CHALLENGE_DELETED', 'TASK_DELETED', 'UNSUBSCRIBED', 'CHALLENGE_CLOSED']},
broken: {type: String, enum: ['CHALLENGE_DELETED', 'TASK_DELETED', 'UNSUBSCRIBED', 'CHALLENGE_CLOSED', 'CHALLENGE_TASK_NOT_FOUND']}, // CHALLENGE_TASK_NOT_FOUND comes from v3 migration
winner: String, // user.profile.name of the winner
},