mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-14 07:52:15 +00:00
fix(gifts): allow gifting 0<gift<1 (cc @Alys @crookedneighbor)
This commit is contained in:
parent
d2e230db1f
commit
1a84d01933
1 changed files with 1 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ api.sendGift = function(req, res, next){
|
|||
case "gems":
|
||||
var amt = req.body.gems.amount / 4,
|
||||
user = res.locals.user;
|
||||
if (!amt || amt < 1 || user.balance < amt)
|
||||
if (!amt || amt <=0 || user.balance < amt)
|
||||
return cb({code: 401, err: "Amount must be within 0 and your current number of gems."});
|
||||
member.balance += amt;
|
||||
user.balance -= amt;
|
||||
|
|
|
|||
Loading…
Reference in a new issue