Merge remote-tracking branch 'origin/master-AIO' into feature/IO-3096-GlobalNotifications
This commit is contained in:
@@ -99,6 +99,7 @@ async function OpenSearchUpdateHandler(req, res) {
|
||||
break;
|
||||
case "payments":
|
||||
//Query to get the job and RO number
|
||||
|
||||
const payment = await client.request(
|
||||
`query ADMIN_GET_PAYMENT_BY_ID($paymentId: uuid!) {
|
||||
payments_by_pk(id: $paymentId) {
|
||||
@@ -147,11 +148,25 @@ async function OpenSearchUpdateHandler(req, res) {
|
||||
body: document
|
||||
};
|
||||
|
||||
logger.log("os-handler", "DEBUG", null, null, {
|
||||
id: req.body.event.data.new.id,
|
||||
index: req.body.table.name,
|
||||
bodyshopid: payload.body.bodyshopid
|
||||
// body: document
|
||||
});
|
||||
|
||||
const response = await osClient.index(payload);
|
||||
//console.log(response.body);
|
||||
res.status(200).json(response.body);
|
||||
}
|
||||
} catch (error) {
|
||||
logger.log("os-handler-error", "ERROR", null, null, {
|
||||
id: req.body.event.data.new.id,
|
||||
index: req.body.table.name,
|
||||
message: error.message,
|
||||
stack: error.stack
|
||||
// body: document
|
||||
});
|
||||
res.status(400).json(JSON.stringify(error));
|
||||
}
|
||||
}
|
||||
@@ -166,7 +181,9 @@ async function OpenSearchSearchHandler(req, res) {
|
||||
}
|
||||
|
||||
logger.log("os-search", "DEBUG", req.user.email, null, {
|
||||
search
|
||||
search,
|
||||
index,
|
||||
bodyshopid
|
||||
});
|
||||
|
||||
const BearerToken = req.BearerToken;
|
||||
|
||||
Reference in New Issue
Block a user