feat: added get all apis for all warehouse modules
This commit is contained in:
@@ -121,4 +121,15 @@ module.exports = {
|
||||
next(error);
|
||||
}
|
||||
},
|
||||
|
||||
getAllWarehouse: async (req, res, next) => {
|
||||
try {
|
||||
const { getAllWithPagination } = require("./utils/pagination");
|
||||
const { page, perPage } = req.query;
|
||||
const data = await getAllWithPagination(Warehouse, page, perPage);
|
||||
res.send({ success: true, data: data });
|
||||
} catch (error) {
|
||||
next(error);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user