mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
* initial quests.vue - refactorings - add group to quests * shows quests by quest-group * buyQuestModal with rewards sidebar * store / actions to load seasonal/time-travelers shop data * buyModal buyPressed instead of buyAction - seasonal shop categories now with specialClass property - seasonal shop * time travelers vue - show hourglass in shopItem / buyDialog - fix banners * cleanup * show amount of already owned quests * show html notes in popovers / dialog * extract purchase-api to common.ops.purchaseWithSpell to call the same in the store / update the UI on purchases * add time-travelers sprites * fix lint * add last mystery set images * remove unused Page * remove equipment from newClient.json
10 lines
331 B
JavaScript
10 lines
331 B
JavaScript
import buySpecialSpellOp from './buySpecialSpell';
|
|
import purchaseOp from './purchase';
|
|
import get from 'lodash/get';
|
|
|
|
module.exports = function purchaseWithSpell (user, req = {}, analytics) {
|
|
const type = get(req.params, 'type');
|
|
|
|
return type === 'spells' ? buySpecialSpellOp(user, req) : purchaseOp(user, req, analytics);
|
|
};
|