susee:modify creditpd insert api
This commit is contained in:
parent
5e4558502b
commit
f365a6283e
@ -90,6 +90,7 @@ exports.PullCreditPdData = async (req, res) => {
|
|||||||
if (temp_array.length > 0)
|
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 );
|
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 index = table_name[0].table_name;
|
||||||
var tableName = arr[index];
|
var tableName = arr[index];
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
const express = require('express')
|
const express = require('express')
|
||||||
const app = express()
|
const app = express()
|
||||||
|
// Enable CORS for all routes
|
||||||
|
const cors = require('cors');
|
||||||
|
app.use(cors());
|
||||||
//it is used to clear cache
|
//it is used to clear cache
|
||||||
app.use(function(req, res, next) {
|
app.use(function(req, res, next) {
|
||||||
res.set("Cache-Control", "no-cache, no-store, must-revalidate, max-age=0")
|
res.set("Cache-Control", "no-cache, no-store, must-revalidate, max-age=0")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user