fix(gifts): allow gifting 0<gift<1 (cc @Alys @crookedneighbor)

This commit is contained in:
Tyler Renelle 2014-12-03 19:00:49 -07:00
parent d2e230db1f
commit 1a84d01933

View file

@ -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;