feat: added get all apis for all warehouse modules

This commit is contained in:
Sathishkumar Krishnan
2022-02-01 20:50:44 +05:30
parent 1740637ec2
commit 09dc72e34e
15 changed files with 127 additions and 0 deletions

View File

@@ -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);
}
},
};