mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
store reminders for tasks
This commit is contained in:
@@ -815,10 +815,13 @@ api.wrap = function(user, main) {
|
||||
message: i18n.t('messageTaskNotFound', req.language)
|
||||
}) : void 0;
|
||||
}
|
||||
_.merge(task, _.omit(req.body, ['checklist', 'id', 'type']));
|
||||
_.merge(task, _.omit(req.body, ['checklist', 'remidners', 'id', 'type']));
|
||||
if (req.body.checklist) {
|
||||
task.checklist = req.body.checklist;
|
||||
}
|
||||
if (req.body.reminders) {
|
||||
task.reminders = req.body.reminders;
|
||||
}
|
||||
if (typeof task.markModified === "function") {
|
||||
task.markModified('tags');
|
||||
}
|
||||
|
||||
@@ -28,7 +28,12 @@ var TaskSchema = {
|
||||
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`
|
||||
}
|
||||
},
|
||||
reminders: [{
|
||||
id: {type:String,'default':shared.uuid},
|
||||
startDate: Date,
|
||||
time: Date
|
||||
}]
|
||||
};
|
||||
|
||||
var HabitSchema = new Schema(
|
||||
|
||||
Reference in New Issue
Block a user