Don't $watch drops (#7547)

* WIP(drops): get drops out of _tmp

* fix(notifications): no watch for drops/mystery

* fix(ops): only two response values

* fix(test): update op expectation
Also update API docs for modified route.

* fix(lint): remove trailing space

* fix(test): update integration check
This commit is contained in:
Sabe Jones
2016-05-31 14:56:33 -05:00
parent 9b56c6f2ba
commit fcc14520c5
7 changed files with 68 additions and 63 deletions

View File

@@ -13,7 +13,6 @@ module.exports = function openMysteryItem (user, req = {}, analytics) {
}
item = _.cloneDeep(content.gear.flat[item]);
item.notificationType = 'Mystery';
user.items.gear.owned[item.key] = true;
user.markModified('purchased.plan.mysteryItems');
@@ -28,16 +27,11 @@ module.exports = function openMysteryItem (user, req = {}, analytics) {
});
}
if (typeof window !== 'undefined') {
if (!user._tmp) user._tmp = {};
user._tmp.drop = item;
}
if (req.v2 === true) {
return user.items.gear.owned;
} else {
return [
user.items.gear.owned,
item,
i18n.t('mysteryItemOpened', req.language),
];
}