From 654c952a9d44f36a173984b549c90e632e4ae5e4 Mon Sep 17 00:00:00 2001 From: khanshanawaz10 Date: Tue, 19 Dec 2023 16:36:53 +0530 Subject: [PATCH] fix - update query for investment summary done --- controller/getInvestmentSummary/index.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/controller/getInvestmentSummary/index.js b/controller/getInvestmentSummary/index.js index 47b359e..9c3f97a 100644 --- a/controller/getInvestmentSummary/index.js +++ b/controller/getInvestmentSummary/index.js @@ -111,18 +111,20 @@ const getUrlAndStore = async (callsData) => { record.scheme_closed_date = callsData[i].scheme_closed_date, record.request_id = callsData[i].request_id, record.source = callsData[i].source, - record.created_at = new Date().toString() - record.last_updatedAt = new Date().toString() + record.created_at = getCurrentDateTime() + record.last_updatedAt = getCurrentDateTime() summary.push(record); } else { let record = { ...callsData[i], - last_updatedAt: new Date().toString() + last_updatedAt: getCurrentDateTime() } - await db.transactionById.update(record, { + + console.log("WWWWWWWWWWWWR", record); + await db.investorSummary.update(record, { where: { - transaction_id: record.transaction_id + request_id: record.request_id } }); }