mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-28 22:05:38 +00:00
7 lines
273 B
JavaScript
7 lines
273 B
JavaScript
|
|
db.users.find({}, {todos: 1}).forEach(function (user) {
|
||
|
|
_.each(user.todos, function (task) {
|
||
|
|
if (moment(task.date).toDate() === 'Invalid Date')
|
||
|
|
task.date = moment().format('MM/DD/YYYY');
|
||
|
|
});
|
||
|
|
db.users.update({_id: user._id}, {$set: {todos: user.todos}});
|
||
|
|
});
|