remove all changes from eslint --fix

This commit is contained in:
Matteo Pagliazzi
2016-03-08 17:45:14 +01:00
parent eeebe4c342
commit 5a2daabada
37 changed files with 224 additions and 223 deletions

View File

@@ -3,29 +3,29 @@ import i18n from '../i18n';
import _ from 'lodash';
import splitWhitespace from '../libs/splitWhitespace';
module.exports = function (user, req, cb, analytics) {
module.exports = function(user, req, cb, analytics) {
var analyticsData, key, ref, type;
ref = req.params, type = ref.type, key = ref.key;
if (!content.timeTravelStable[type]) {
return typeof cb === 'function' ? cb({
return typeof cb === "function" ? cb({
code: 403,
message: i18n.t('typeNotAllowedHourglass', req.language) + JSON.stringify(_.keys(content.timeTravelStable))
}) : void 0;
}
if (!_.contains(_.keys(content.timeTravelStable[type]), key)) {
return typeof cb === 'function' ? cb({
return typeof cb === "function" ? cb({
code: 403,
message: i18n.t(type + 'NotAllowedHourglass', req.language)
}) : void 0;
}
if (user.items[type][key]) {
return typeof cb === 'function' ? cb({
return typeof cb === "function" ? cb({
code: 403,
message: i18n.t(type + 'AlreadyOwned', req.language)
}) : void 0;
}
if (!(user.purchased.plan.consecutive.trinkets > 0)) {
return typeof cb === 'function' ? cb({
return typeof cb === "function" ? cb({
code: 403,
message: i18n.t('notEnoughHourglasses', req.language)
}) : void 0;
@@ -44,10 +44,10 @@ module.exports = function (user, req, cb, analytics) {
acquireMethod: 'Hourglass',
category: 'behavior'
};
if (analytics) {
if (analytics != null) {
analytics.track('acquire item', analyticsData);
}
return typeof cb === 'function' ? cb({
return typeof cb === "function" ? cb({
code: 200,
message: i18n.t('hourglassPurchase', req.language)
}, _.pick(user, splitWhitespace('items purchased.plan.consecutive'))) : void 0;