fix: resend mail API is not working

This commit is contained in:
prafull-opensignlabs
2024-05-14 16:36:58 +05:30
parent 4e128e5a5a
commit c03819f5a9
@@ -33,10 +33,11 @@ export default async function resendMail(request, response) {
docQuery.notEqualTo('IsCompleted', true);
docQuery.notEqualTo('IsDeclined', true);
docQuery.notEqualTo('IsArchive', true);
docQuery.lessThanOrEqualTo('ExpiryDate', new Date());
docQuery.greaterThanOrEqualTo('ExpiryDate', new Date());
docQuery.exists('SignedUrl');
const resDoc = await docQuery.first({ useMasterKey: true });
// console.log("resDoc ",resDoc)
if (resDoc) {
const _resDoc = resDoc.toJSON();
const contact = _resDoc.Signers.find(x => x.Email === userMail);