mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 01:01:49 +10:00
fix: await signing requests
This commit is contained in:
@ -48,11 +48,14 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let sentRequests = 0;
|
let sentRequests = 0;
|
||||||
recipients.forEach(async (recipient) => {
|
|
||||||
await sendSigningRequest(recipient, document, user);
|
|
||||||
|
|
||||||
sentRequests++;
|
await Promise.all(
|
||||||
});
|
recipients.map(async (recipient) => {
|
||||||
|
await sendSigningRequest(recipient, document, user);
|
||||||
|
|
||||||
|
sentRequests++;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
if (sentRequests === recipients.length) {
|
if (sentRequests === recipients.length) {
|
||||||
return res.status(200).send(recipients.length);
|
return res.status(200).send(recipients.length);
|
||||||
|
|||||||
Reference in New Issue
Block a user