mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 05:37:22 +01:00
feat(mystery): July 2015 goodies
Also makes the mystery box opening notification translatable and adds item graphics to it.
This commit is contained in:
32
migrations/mystery_items.js
Normal file
32
migrations/mystery_items.js
Normal file
@@ -0,0 +1,32 @@
|
||||
var _id = '';
|
||||
var update = {
|
||||
$addToSet: {
|
||||
'purchased.plan.mysteryItems':{
|
||||
$each:['back_mystery_201507','eyewear_mystery_201507']
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*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});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user