mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-16 17:02:18 +00:00
Merge pull request #3919 from negue/getBuyableGear
API: get a list of buyable gear
This commit is contained in:
commit
8d0611e888
2 changed files with 11 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Reference in a new issue