susee:modify creditpd insert api

This commit is contained in:
suseendhiran17 2023-07-08 14:37:23 +05:30
parent 5e4558502b
commit f365a6283e
2 changed files with 5 additions and 1 deletions

View File

@ -89,7 +89,8 @@ exports.PullCreditPdData = async (req, res) => {
if (temp_array.length > 0)
{
temp_array.forEach(async(element) => {
temp_array.forEach(async(element) => {
if (OverallKey == "Borrower & Guarantor Details" && element.entity_type.toLowerCase() != "individual") { console.log(element.borrower_type.toLowerCase()); Object.assign(element,{borrower_age : element.numbers_of_years_business_running}); delete element.numbers_of_years_business_running; }
Object.assign(element , {pd_id : PDID.dataValues.pd_id , ref_no : req.body.pdid} ); Object.assign(element ,obj );
var index = table_name[0].table_name;
var tableName = arr[index];

View File

@ -1,6 +1,9 @@
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")