IO-2933 Resolve PR comments.
This commit is contained in:
@@ -172,12 +172,9 @@ exports.postback = async (req, res) => {
|
||||
|
||||
//Adding in the user email to the short pay email.
|
||||
//Need to check this to ensure backwards compatibility for clients that don't update.
|
||||
let partialPayments;
|
||||
if (!Array.isArray(parsedComment)) {
|
||||
partialPayments = parsedComment.payments;
|
||||
} else {
|
||||
partialPayments = parsedComment;
|
||||
}
|
||||
|
||||
const partialPayments = Array.isArray(parsedComment) ? parsedComment : parsedComment.payments;
|
||||
|
||||
const jobs = await gqlClient.request(queries.GET_JOBS_BY_PKS, {
|
||||
ids: partialPayments.map((p) => p.jobid)
|
||||
});
|
||||
@@ -207,7 +204,7 @@ exports.postback = async (req, res) => {
|
||||
iprequest: values,
|
||||
paymentResult
|
||||
});
|
||||
res.sendStatus(200);
|
||||
|
||||
if (values.origin === "OneLink" && parsedComment.userEmail) {
|
||||
//Send an email, it was a text to pay link.
|
||||
const endPoints = getEndpoints();
|
||||
@@ -226,6 +223,7 @@ exports.postback = async (req, res) => {
|
||||
.join("<br/>")
|
||||
})
|
||||
});
|
||||
res.sendStatus(200);
|
||||
}
|
||||
} else if (values.invoice) {
|
||||
//This is a link email that's been sent out.
|
||||
|
||||
Reference in New Issue
Block a user