feat: added inventory types get api

This commit is contained in:
Sathishkumar Krishnan
2022-01-25 15:16:42 +05:30
parent e04eac955e
commit 25f715bd3a
2 changed files with 12 additions and 0 deletions

View File

@@ -3,6 +3,13 @@ const WidgetFamily = require("../models/WidgetFamily");
const { InventoryTypes } = require("../config/constants");
module.exports = {
/**
* Gets the Inventory types
*/
getInventoryTypes: async (req, res, next) => {
res.send({ success: true, data: InventoryTypes });
},
/**
* Gets the Inventory data by `id`
*/

View File

@@ -11,6 +11,11 @@ router.post("/", controller.createInventory);
*/
router.patch("/:id", controller.updateInventoryByID);
/**
* @route /inventory/types
*/
router.get("/types", controller.getInventoryTypes);
/**
* @route /inventory/filter-by-type
*/