From b5bd01dc51e3162e2885e5489b55f5886edc16e2 Mon Sep 17 00:00:00 2001 From: suseendhiran17 <58357088+suseendhiran17@users.noreply.github.com> Date: Mon, 23 May 2022 15:14:27 +0530 Subject: [PATCH] susee --- .gitignore | 7 ++++--- app/controllers/creditpd.controller.js | 9 ++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 0ad50cd..4af7866 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /node_modules /storage/log/ /storage/uploads/ -**/*.jpg -!storage/uploads/*.jpg - +!storage +storage/* +storage/uploads/* +!storage/uploads/ diff --git a/app/controllers/creditpd.controller.js b/app/controllers/creditpd.controller.js index a1b150a..8e6d625 100644 --- a/app/controllers/creditpd.controller.js +++ b/app/controllers/creditpd.controller.js @@ -73,11 +73,10 @@ exports.PullCreditPdData = async (req, res) => } } // Object.assign( obj , { ref_no : req.body.pdid }); - await CreditGeneralInformation.create(obj) - .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); }); - pd_id = await CreditGeneralInformation.findOne({ where : { ref_no : req.body.pdid , is_active : 1 }}); - // pd_id = await CreditGeneralInformation.create(obj) + pd_id = await CreditGeneralInformation.create(obj) + // .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); }); + // pd_id = await CreditGeneralInformation.findOne({ where : { ref_no : req.body.pdid , is_active : 1 }}); // loop to check if the data is array or nestedObject or objects