diff --git a/src/routes/atm.route.js b/src/routes/atm.route.js index 879e2dd..ff63be9 100644 --- a/src/routes/atm.route.js +++ b/src/routes/atm.route.js @@ -6,7 +6,7 @@ const router = express.Router(); const atmRoute = async (req, res) => { try { - const query_str = 'SELECT * FROM atm'; + const query_str = 'SELECT * FROM atm_details'; const result = await db.query(query_str); return res.json(result.rows); } catch (error) { diff --git a/src/routes/emandate.route.js b/src/routes/emandate.route.js index 90f7c29..42e4d55 100644 --- a/src/routes/emandate.route.js +++ b/src/routes/emandate.route.js @@ -13,12 +13,12 @@ const emandateData = async (req, res) => { headers: { 'Content-Type': 'application/json', }, } ); - logger.info("Data validate"); - return response.data; + logger.info(response.data, "Data validate"); + 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' }); } }; router.post('/validation', emandateData); -module.exports = router; \ No newline at end of file +module.exports = router;