mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
scroll quickfix
This commit is contained in:
parent
ca4f88754f
commit
3dcd5e15bf
1 changed files with 1 additions and 1 deletions
|
|
@ -604,7 +604,7 @@ api.wrap = (user, main=true) ->
|
|||
item = content[type][key]
|
||||
return cb?({code:404,message:":key not found for Content.#{type}"},req) unless item
|
||||
return cb?({code:401, message: i18n.t('notEnoughGems', req.language)}) if user.balance < (item.value / 4)
|
||||
user.items[type][key] = 0 unless user.items[type][key]
|
||||
user.items[type][key] = 0 unless user.items[type][key] > 0
|
||||
user.items[type][key]++
|
||||
user.balance -= (item.value / 4)
|
||||
cb? null, _.pick(user,$w 'items balance')
|
||||
|
|
|
|||
Loading…
Reference in a new issue