mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +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)
|
message: i18n.t('messageTaskNotFound', req.language)
|
||||||
}) : void 0;
|
}) : void 0;
|
||||||
}
|
}
|
||||||
_.merge(task, _.omit(req.body, ['checklist', 'id', 'type']));
|
_.merge(task, _.omit(req.body, ['checklist', 'remidners', 'id', 'type']));
|
||||||
if (req.body.checklist) {
|
if (req.body.checklist) {
|
||||||
task.checklist = req.body.checklist;
|
task.checklist = req.body.checklist;
|
||||||
}
|
}
|
||||||
|
if (req.body.reminders) {
|
||||||
|
task.reminders = req.body.reminders;
|
||||||
|
}
|
||||||
if (typeof task.markModified === "function") {
|
if (typeof task.markModified === "function") {
|
||||||
task.markModified('tags');
|
task.markModified('tags');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,12 @@ var TaskSchema = {
|
|||||||
broken: String, // CHALLENGE_DELETED, TASK_DELETED, UNSUBSCRIBED, CHALLENGE_CLOSED
|
broken: String, // CHALLENGE_DELETED, TASK_DELETED, UNSUBSCRIBED, CHALLENGE_CLOSED
|
||||||
winner: String // user.profile.name
|
winner: String // user.profile.name
|
||||||
// group: {type: 'Strign', ref: 'Group'} // if we restore this, rename `id` above to `challenge`
|
// 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(
|
var HabitSchema = new Schema(
|
||||||
|
|||||||
Reference in New Issue
Block a user