diff --git a/apps/web/pages/api/documents/[id]/sign.ts b/apps/web/pages/api/documents/[id]/sign.ts index b88b13fa1..70a4b4a6a 100644 --- a/apps/web/pages/api/documents/[id]/sign.ts +++ b/apps/web/pages/api/documents/[id]/sign.ts @@ -90,7 +90,9 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) { 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();