Merged in feature/IO-2261-opensearch-replacements (pull request #757)

IO-2261 All Jobs, Bills, Payments

Approved-by: Patrick Fic
This commit is contained in:
Allan Carr
2023-05-05 14:49:23 +00:00
committed by Patrick Fic
4 changed files with 16 additions and 10 deletions

View File

@@ -130,7 +130,6 @@ async function OpenSearchUpdateHandler(req, res) {
`,
{ billId: req.body.event.data.new.id }
);
document = {
..._.pick(req.body.event.data.new, [
"id",
@@ -142,7 +141,6 @@ async function OpenSearchUpdateHandler(req, res) {
...bill.bills_by_pk,
bodyshopid: bill.bills_by_pk.job.shopid,
};
break;
case "payments":
//Query to get the job and RO number
@@ -183,11 +181,10 @@ async function OpenSearchUpdateHandler(req, res) {
"type",
]),
...payment.payments_by_pk,
bodyshopid: bill.payments_by_pk.job.shopid,
bodyshopid: payment.payments_by_pk.job.shopid,
};
break;
}
const payload = {
id: req.body.event.data.new.id,
index: req.body.table.name,