Browse Source

fix - update query for investment summary done

pull/1/head
khanshanawaz10 1 year ago
parent
commit
654c952a9d
1 changed files with 7 additions and 5 deletions
  1. +7
    -5
      controller/getInvestmentSummary/index.js

+ 7
- 5
controller/getInvestmentSummary/index.js View File

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


Loading…
Cancel
Save

Powered by TurnKey Linux.