challenge prize: award winner 1 achievement and challenge.prize

gems. then close challenge.
This commit is contained in:
Tyler Renelle
2013-10-31 13:49:31 -07:00
parent f6ebd9997e
commit 9d15e724e2
5 changed files with 73 additions and 15 deletions
+2 -1
View File
@@ -28,7 +28,8 @@ var TaskSchema = new Schema({
streak: {type: Number, 'default': 0},
challenge: {
id: {type: 'String', ref:'Challenge'},
broken: String // CHALLENGE_DELETED, TASK_DELETED, UNSUBSCRIBED, etc
broken: String, // CHALLENGE_DELETED, TASK_DELETED, UNSUBSCRIBED, CHALLENGE_CLOSED
winner: String // user.profile.name
// group: {type: 'Strign', ref: 'Group'} // if we restore this, rename `id` above to `challenge`
}
}, {