errors working with babel 6, export v3 shared modules in main common module

This commit is contained in:
Matteo Pagliazzi
2016-03-05 18:58:40 +01:00
parent b97511db31
commit 863ca9954e
9 changed files with 41 additions and 13 deletions

View File

@@ -10,13 +10,14 @@ import {
NotAuthorized,
BadRequest,
} from '../../libs/api-v3/errors';
import shared from '../../../../common';
import common from '../../../../common';
import Q from 'q';
import _ from 'lodash';
import moment from 'moment';
import scoreTask from '../../../../common/script/api-v3/scoreTask';
import { preenHistory } from '../../libs/api-v3/preening';
const scoreTask = common.v3.scoreTask;
let api = {};
// challenge must be passed only when a challenge task is being created
@@ -334,8 +335,8 @@ api.updateTask = {
function _generateWebhookTaskData (task, direction, delta, stats, user) {
let extendedStats = _.extend(stats, {
toNextLevel: shared.tnl(user.stats.lvl),
maxHealth: shared.maxHealth,
toNextLevel: common.tnl(user.stats.lvl),
maxHealth: common.maxHealth,
maxMP: user._statsComputed.maxMP, // TODO refactor as method not getter
});