This commit is contained in:
suseendhiran17 2022-05-23 15:14:27 +05:30
parent fcabbf4380
commit b5bd01dc51
2 changed files with 8 additions and 8 deletions

7
.gitignore vendored
View File

@ -2,6 +2,7 @@
/node_modules /node_modules
/storage/log/ /storage/log/
/storage/uploads/ /storage/uploads/
**/*.jpg !storage
!storage/uploads/*.jpg storage/*
storage/uploads/*
!storage/uploads/

View File

@ -73,11 +73,10 @@ exports.PullCreditPdData = async (req, res) =>
} }
} }
// Object.assign( obj , { ref_no : req.body.pdid }); // Object.assign( obj , { ref_no : req.body.pdid });
await CreditGeneralInformation.create(obj) pd_id = await CreditGeneralInformation.create(obj)
.then((successData)=>{logMsg.info("GeneralInformation insert success ,PdId= "+successData.dataValues.pd_id);}) // .then((successData)=>{logMsg.info("GeneralInformation insert success ,PdId= "+successData.dataValues.pd_id);})
.catch((err)=>{ logMsg.info("GeneralInformation insert failed ,PdId(ref_no)= "+req.body.pdid); }); // .catch((err)=>{ logMsg.info("GeneralInformation insert failed ,PdId(ref_no)= "+req.body.pdid); });
pd_id = await CreditGeneralInformation.findOne({ where : { ref_no : req.body.pdid , is_active : 1 }}); // pd_id = await CreditGeneralInformation.findOne({ where : { ref_no : req.body.pdid , is_active : 1 }});
// pd_id = await CreditGeneralInformation.create(obj)
// loop to check if the data is array or nestedObject or objects // loop to check if the data is array or nestedObject or objects