feat : add customer no in validate API

This commit is contained in:
2025-12-23 11:54:23 +05:30
parent 7cf19000d1
commit 9446abd88b

View File

@@ -8,13 +8,16 @@ const emandateData = async (req, res) => {
return res.status(404).json({ error: 'DATA NOT FOUND FROM CLIENT' })
try {
const reqData = { data, mandateRequest, mandateType };
if (customer_no) {
reqData.customer_no = customer_no;
}
const response = await axios.post('http://192.168.1.166:9992/kccb/validation', reqData,
{
headers: { 'Content-Type': 'application/json', },
}
);
logger.info(response.data, "Data validate");
return res.json({data: response.data});
return res.json({ data: response.data });
} catch (error) {
logger.error(error, 'error occured while E-Mandate validation');
return res.status(500).json({ error: 'INTERNAL_SERVER_ERROR' });