🔥 The free & Open Source DocuSign alternative
JavaScript digital-signaturedocument-signingdocusign-alternativedocusign-freee-signatureelectronic-signatureelectronic-signaturesesignesignaturehacktoberfestjavascriptlegaltechmongodbnodejsopen-sourcepdf-signpdf-signaturereactjsself-hostedsign-pdf-files
fix: x is not defined error in createDocumentWithTemplate and createDocumentwithCoordinate function
RaktimaNXGa26e65f76f3d
diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.jsindex f70466a9f..49615a6cc 100644--- a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js+++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js@@ -317,13 +317,13 @@ export default async function createDocumentWithTemplate(request, response) {properties: { response_code: 200 },});}- //encode this url value `${res.id}/${x.email}/${x.contactPtr.objectId}` to base64 using `btoa` function- const encodeBase64 = btoa(`${res.id}/${x.email}/${x.contactPtr.objectId}`);return response.json({objectId: res.id,signurl: contact.map(x => ({email: x.email,- url: `${baseUrl.origin}/login/${encodeBase64}`,+ url: `${baseUrl.origin}/login/${btoa(+ `${res.id}/${x.email}/${x.contactPtr.objectId}`+ )}`,})),message: 'Document sent successfully!',});diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.jsindex 52c00ef33..560b114aa 100644--- a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js+++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js@@ -361,13 +361,11 @@ export default async function createDocumentwithCoordinate(request, response) {properties: { response_code: 200 },});}- //encode this url value `${res.id}/${x.email}/${x.contactPtr.objectId}` to base64 using `btoa` function- const encodeBase64 = btoa(`${res.id}/${x.email}/${x.contactPtr.objectId}`);return response.json({objectId: res.id,signurl: contact.map(x => ({email: x.email,- url: `${baseUrl.origin}/login/${encodeBase64}`,+ url: `${baseUrl.origin}/login/${btoa(`${res.id}/${x.email}/${x.contactPtr.objectId}`)}`,})),message: 'Document sent successfully!',});