diff --git a/app/controllers/loan.details.controller.js b/app/controllers/loan.details.controller.js index bf262e2..31b704e 100644 --- a/app/controllers/loan.details.controller.js +++ b/app/controllers/loan.details.controller.js @@ -70,7 +70,8 @@ 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 + pan_no : value.panNo, + entity_type : value.kycType.trim() } ResData.lstApplicantAddress.forEach(async(address_value,index) => { @@ -108,6 +109,8 @@ exports.mainLandingPage = async (req, res) => } }); }); // end of entity detail promise + + // Create Entity detail EntityKYCDetailDataInsert.then(async(lstEntityKYCDetailDataArray)=> { @@ -134,10 +137,11 @@ exports.mainLandingPage = async (req, res) => lstApplicantKYCDetailObj = { Applicant_id : value.iD_ApplicantKYCDetail, - Applicant_entity_type : value.kycType.trim(), losid : LoanDetailData.dataValues.losid , loan_no_id : LoanDetailData.dataValues.id , name : [value.firstName, value.middleName, value.lastName ].filter(Boolean).join(" "), // concat and ignore null + pan_no : value.panNo, + entity_type : value.kycType.trim(), } lstApplicantKYCDetailDataArray.push(lstApplicantKYCDetailObj); } 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")