Merged in feature/IO-2520-Kaizen-Data-Pump (pull request #1336)
IO-2520 Change where email notification occurs Approved-by: Dave Richer
This commit is contained in:
@@ -201,19 +201,24 @@ exports.default = async (req, res) => {
|
|||||||
} finally {
|
} finally {
|
||||||
sftp.end();
|
sftp.end();
|
||||||
}
|
}
|
||||||
sendServerEmail({
|
// sendServerEmail({
|
||||||
subject: `Kaizen Report ${moment().format("MM-DD-YY")}`,
|
// subject: `Kaizen Report ${moment().format("MM-DD-YY")}`,
|
||||||
text: `Errors: ${allErrors.map((e) => JSON.stringify(e, null, 2))}
|
// text: `Errors: ${allErrors.map((e) => JSON.stringify(e, null, 2))}
|
||||||
Uploaded: ${JSON.stringify(
|
// Uploaded: ${JSON.stringify(
|
||||||
allxmlsToUpload.map((x) => ({ filename: x.filename, count: x.count })),
|
// allxmlsToUpload.map((x) => ({ filename: x.filename, count: x.count })),
|
||||||
null,
|
// null,
|
||||||
2
|
// 2
|
||||||
)}
|
// )}
|
||||||
`,
|
// `,
|
||||||
});
|
// });
|
||||||
res.sendStatus(200);
|
res.sendStatus(200);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
res.status(200).json(error);
|
res.status(200).json(error);
|
||||||
|
sendServerEmail({
|
||||||
|
subject: `Kaizen Report ${moment().format("MM-DD-YY @ HH:mm:ss")}`,
|
||||||
|
text: `Errors: JSON.stringify(error)}
|
||||||
|
All Errors: ${allErrors.map((e) => JSON.stringify(e, null, 2))}`,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user