Files
habitica/migrations/mysteryitems.js
benmanley 50b1cba0a6 refactor(tasks) improve UI consistency
* Round corners for UI elements / “8-bit” outlines for RPG elements.
* Tag bar – Make it clearer that “Tags” is a heading, not an option
* Task filters – restyle in line with tag bar + nav menu
2014-11-27 10:32:57 +00:00

33 lines
644 B
JavaScript

var _id = '';
var update = {
$push: {
'purchased.plan.mysteryItems':{
$each:['head_mystery_201411','weapon_mystery_201411']
}
}
};
/*var update = {
$set:{
'purchased.plan':{
customerId: "",
dateCreated: new Date(),
dateTerminated: null,
dateUpdated:new Date(),
gemsBought: 0,
mysteryItems: [],
paymentMethod: "Paypal",
planId : "basic_earned"
}
}
};*/
if (_id) {
// singular (missing items)
db.users.update({_id:_id}, update);
} else {
// multiple (once @ start of event)
db.users.update({'purchased.plan.customerId':{$ne:null}}, update, {multi:true});
}