mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 23:42:12 +00:00
Keep mystery items synced with server (#11039)
This commit is contained in:
parent
f548103f4c
commit
1d8a5b1952
2 changed files with 4 additions and 3 deletions
|
|
@ -469,8 +469,6 @@ export default {
|
|||
let openedItem = result.data.data;
|
||||
let text = this.content.gear.flat[openedItem.key].text();
|
||||
this.drop(this.$t('messageDropMysteryItem', {dropText: text}), openedItem);
|
||||
item.quantity--;
|
||||
this.$forceUpdate();
|
||||
} else {
|
||||
this.$root.$emit('selectMembersModal::showItem', item);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import axios from 'axios';
|
|||
import { togglePinnedItem as togglePinnedItemOp } from 'common/script/ops/pinnedGearUtils';
|
||||
import changeClassOp from 'common/script/ops/changeClass';
|
||||
import disableClassesOp from 'common/script/ops/disableClasses';
|
||||
import openMysteryItemOp from 'common/script/ops/openMysteryItem';
|
||||
|
||||
export function fetch (store, options = {}) { // eslint-disable-line no-shadow
|
||||
return loadAsyncResource({
|
||||
|
|
@ -127,7 +128,9 @@ export function castSpell (store, params) {
|
|||
return axios.post(spellUrl, data);
|
||||
}
|
||||
|
||||
export function openMysteryItem () {
|
||||
export async function openMysteryItem (store) {
|
||||
let user = store.state.user.data;
|
||||
openMysteryItemOp(user);
|
||||
return axios.post('/api/v4/user/open-mystery-item');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue