🐛 send complete mail before insert

This commit is contained in:
Timur Ercan
2023-02-28 13:27:17 +01:00
parent 01f88a8715
commit 278a53a79f

View File

@ -90,7 +90,9 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
select: { email: true, name: true }, select: { email: true, name: true },
}); });
if (documentOwner) sendSigningDoneMail(recipient, document, documentOwner); document.document = documentWithSignatureImages;
if (documentOwner)
await sendSigningDoneMail(recipient, document, documentOwner);
} }
return res.status(200).end(); return res.status(200).end();