From 4841c4d54e2094e8ef20b95a968376ba492a052f Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Sun, 25 Aug 2013 20:39:54 -0400 Subject: [PATCH] allow purchasing potion on API --- src/controllers/api.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/api.coffee b/src/controllers/api.coffee index ce98cc4e65..080ca76771 100644 --- a/src/controllers/api.coffee +++ b/src/controllers/api.coffee @@ -220,8 +220,8 @@ api.sortTask = (req, res, next) -> api.buy = (req, res, next) -> {user} = res.locals type = req.params.type - unless type in ['weapon', 'armor', 'head', 'shield'] - return res.json(400, err: ":type must be in one of: 'weapon', 'armor', 'head', 'shield'") + unless type in ['weapon', 'armor', 'head', 'shield', 'potion'] + return res.json(400, err: ":type must be in one of: 'weapon', 'armor', 'head', 'shield', 'potion'") hasEnough = items.buyItem(user, type) if hasEnough user.save (err, saved) ->