|
|
@ -1484,3 +1484,20 @@ exports.getordersofcustomer = async (req, reply) => {
|
|
|
|
throw boom.boomify(err);
|
|
|
|
throw boom.boomify(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exports.getallsuppliers = async (req, reply) => {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
// Find the specific tank
|
|
|
|
|
|
|
|
const suppliers = await Supplier.find({
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
if (!suppliers) {
|
|
|
|
|
|
|
|
return reply.send({ status_code: 404, error: "suppliers not found" });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Send the found tank within a list
|
|
|
|
|
|
|
|
reply.send({ status_code: 200, data: [suppliers] });
|
|
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
|
|
throw boom.boomify(err);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|