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 } }); }