diff --git a/app/controllers/loan.details.controller.js b/app/controllers/loan.details.controller.js index bf262e2..e7f0933 100644 --- a/app/controllers/loan.details.controller.js +++ b/app/controllers/loan.details.controller.js @@ -70,7 +70,7 @@ exports.mainLandingPage = async (req, res) => loan_no_id : LoanDetailData.dataValues.id , entity_name : [value.firstName, value.middleName, value.lastName ].filter(Boolean).join(" "), entity_formation_date : moment(new Date(value.doi)).format("YYYY-MM-DD"), - // entity_type : value.kycType + //entity_type : value.kycType.trim() } ResData.lstApplicantAddress.forEach(async(address_value,index) => { @@ -108,6 +108,8 @@ exports.mainLandingPage = async (req, res) => } }); }); // end of entity detail promise + + // Create Entity detail EntityKYCDetailDataInsert.then(async(lstEntityKYCDetailDataArray)=> { diff --git a/server.js b/server.js index 44edb4f..c17fe63 100644 --- a/server.js +++ b/server.js @@ -1,6 +1,10 @@ require('dotenv').config(); const express = require('express') const app = express() +// Enable CORS for all routes +const cors = require('cors'); +app.use(cors()); + //it is used to clear cache app.use(function(req, res, next) { res.set("Cache-Control", "no-cache, no-store, must-revalidate, max-age=0")