feat: send email when all recipients have signed

This commit is contained in:
Ephraim Atta-Duncan
2023-09-07 20:14:04 +00:00
committed by Mythie
parent b17e73003e
commit 94215fffbb
3 changed files with 61 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import { DocumentStatus, SigningStatus } from '@documenso/prisma/client';
import { getFile } from '../../universal/upload/get-file';
import { putFile } from '../../universal/upload/put-file';
import { insertFieldInPDF } from '../pdf/insert-field-in-pdf';
import { sendCompletedEmail } from './send-completed-email';
export type SealDocumentOptions = {
documentId: number;
@ -86,4 +87,6 @@ export const sealDocument = async ({ documentId }: SealDocumentOptions) => {
data: newData,
},
});
await sendCompletedEmail({ documentId });
};