display customizations in new shop

This commit is contained in:
Phillip Thelen
2024-02-01 15:06:32 +01:00
committed by Sabe Jones
parent 982069df36
commit f99ddbe60f
12 changed files with 836 additions and 69 deletions

View File

@@ -144,4 +144,26 @@ api.getBackgroundShopItems = {
},
};
/**
* @apiIgnore
* @api {get} /api/v3/shops/customizations get the available items for the backgrounds shop
* @apiName GetCustomizationShopItems
* @apiGroup Shops
*
* @apiSuccess {Object} data List of available backgrounds
* @apiSuccess {string} message Success message
*/
api.getBackgroundShopItems = {
method: 'GET',
url: '/shops/customizations',
middlewares: [authWithHeaders()],
async handler (req, res) {
const { user } = res.locals;
const resObject = shops.getCustomizationShop(user, req.language);
res.respond(200, resObject);
},
};
export default api;