Skip to content

Commit

Permalink
get a list of buyable gear
Browse files Browse the repository at this point in the history
  • Loading branch information
negue committed Aug 25, 2014
1 parent ef548ec commit 8fa565e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/controllers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ api.getTask = function(req, res, next) {
*/
// api.buy // handled in Shard.ops

api.getBuyList = function (req, res, next) {
var list = shared.updateStore(res.locals.user);

return res.json(200, list);
};

/*
------------------------------------------------------------------------
User
Expand Down
5 changes: 5 additions & 0 deletions src/routes/apiv2.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ module.exports = (swagger, v2) ->


# Inventory
"/user/inventory/buy":
spec:
description: "Get a list of buyable gear"
action: user.getBuyList

"/user/inventory/buy/{key}":
spec:
method: 'POST'
Expand Down

0 comments on commit 8fa565e

Please sign in to comment.