From 60d252a110d88fe8be82c5991f5b3c929a3f9974 Mon Sep 17 00:00:00 2001 From: suseendhiran17 <58357088+suseendhiran17@users.noreply.github.com> Date: Thu, 30 Jun 2022 13:30:51 +0530 Subject: [PATCH] susee , loanDetail api --- .../entity.applicant.controller.js | 8 +------ app/controllers/test.controller.js | 22 ------------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/app/controllers/entity.applicant.controller.js b/app/controllers/entity.applicant.controller.js index e11ccd2..aea13b2 100644 --- a/app/controllers/entity.applicant.controller.js +++ b/app/controllers/entity.applicant.controller.js @@ -953,13 +953,7 @@ exports.updateLoanDetail = async (req, res) => delete req.body.id; delete req.body.updatedby; // update old value is_active = 0 where requested id - await LoanDetail.update({ updatedby : updatedby ,is_active : 0 },{ where: { id: id }}); - // create new entry - LoanDetail.create(req.body).then(data => - { - res.send({'status':200,'message':"success",'data':data}); - - }) + await LoanDetail.update(req.body,{ where: { id: id }}) .catch(err => { res.send({'status':404, message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" }); diff --git a/app/controllers/test.controller.js b/app/controllers/test.controller.js index c74c824..d683a91 100644 --- a/app/controllers/test.controller.js +++ b/app/controllers/test.controller.js @@ -30,25 +30,3 @@ exports.Welcome = (req, res) => - -// IF( -// AND( variance_in_mv1_and_mv2 > 10% , OR (mark_valuation_1 = "",mark_valuation_1 = 0, mark_valuation_2 ="",mark_valuation_2 =0,third_val_not_req="",third_val_not_req=0) ), -// "Inputs Required", - -// IF( -// OR( override="", override ="Average"), -// IF( variance_in_mv1_and_mv2 <= 10% , -// ( mark_valuation_1 + mark_valuation_2 )/2 , -// ( third_val_not_req + mark_valuation_2 + mark_valuation_1 - MAX(third_val_not_req , mark_valuation_2, mark_valuation_1))/2), - -// IF( override ="Lower", -// IF(variance_in_mv1_and_mv2 <= 10% , -// MIN(mark_valuation_1, mark_valuation_2 ), -// MIN(third_val_not_req ,mark_valuation_2,mark_valuation_1)), - -// IF( override ="Higher" -// ,IF(variance_in_mv1_and_mv2 <= 10% , -// MAX(mark_valuation_1,mark_valuation_2), -// MAX(third_val_not_req ,mark_valuation_2,mark_valuation_1)))) -// ) -// ) \ No newline at end of file