fix anonymous feedback sending

This commit is contained in:
Emi Matchu 2020-10-22 23:35:01 -07:00
parent e7cc20876b
commit 9f692b02b8

View file

@ -28,11 +28,14 @@ async function handle(req, res) {
to: "matchu1993@gmail.com",
from: "impress-2020-feedback@openneo.net",
subject: `DTI feedback: ${contentSummary}`,
replyTo: email,
replyTo: email || undefined,
text: content,
});
} catch (e) {
console.error(e);
if (e.response && e.response.body && e.response.body.errors) {
console.error(e.response.body.errors);
}
return res.status(500).send("Error sending message, see logs");
}