fix: incorrect promise.all usages

This commit is contained in:
Mythie
2023-12-02 12:43:43 +11:00
parent 16fb90f4d2
commit 486b1cbf62
3 changed files with 6 additions and 6 deletions

View File

@ -45,7 +45,7 @@ export const sendDocument = async ({ documentId, userId }: SendDocumentOptions)
throw new Error('Can not send completed document');
}
await Promise.all([
await Promise.all(
document.Recipient.map(async (recipient) => {
const { email, name } = recipient;
@ -96,7 +96,7 @@ export const sendDocument = async ({ documentId, userId }: SendDocumentOptions)
},
});
}),
]);
);
const updatedDocument = await prisma.document.update({
where: {