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

@@ -2,22 +2,22 @@ import content from '../content/index';
import _ from 'lodash';
import splitWhitespace from '../libs/splitWhitespace';
module.exports = function (user, req, cb) {
module.exports = function(user, req, cb) {
var key, ref, type;
ref = req.params, key = ref.key, type = ref.type;
if (type !== 'eggs' && type !== 'hatchingPotions' && type !== 'food') {
return typeof cb === 'function' ? cb({
return typeof cb === "function" ? cb({
code: 404,
message: ':type not found. Must bes in [eggs, hatchingPotions, food]'
message: ":type not found. Must bes in [eggs, hatchingPotions, food]"
}) : void 0;
}
if (!user.items[type][key]) {
return typeof cb === 'function' ? cb({
return typeof cb === "function" ? cb({
code: 404,
message: ':key not found for user.items.' + type
message: ":key not found for user.items." + type
}) : void 0;
}
user.items[type][key]--;
user.stats.gp += content[type][key].value;
return typeof cb === 'function' ? cb(null, _.pick(user, splitWhitespace('stats items'))) : void 0;
return typeof cb === "function" ? cb(null, _.pick(user, splitWhitespace('stats items'))) : void 0;
};