mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-22 23:52:30 +02:00
fix: x is not defined error in createDocumentWithTemplate and createDocumentwithCoordinate function
This commit is contained in:
@@ -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!',
|
||||
});
|
||||
|
||||
@@ -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!',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user