mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-17 21:25:54 +02:00
change response of createdocument API
This commit is contained in:
@@ -233,19 +233,14 @@ export default async function createDocumentwithCoordinate(request, response) {
|
||||
}
|
||||
|
||||
if (sendMail.data.result.status === 'success') {
|
||||
const user = contact.find(x => x.email === parseExtUser.Email);
|
||||
if (user && user.email) {
|
||||
return response.json({
|
||||
objectId: res.id,
|
||||
url: `${baseUrl.origin}/loadmf/signmicroapp/login/${res.id}/${user.email}/${user.contactPtr.objectId}/${serverParams}`,
|
||||
message: 'Document sent successfully!',
|
||||
});
|
||||
} else {
|
||||
return response.json({
|
||||
objectId: res.id,
|
||||
message: 'Document sent successfully!',
|
||||
});
|
||||
}
|
||||
return response.json({
|
||||
objectId: res.id,
|
||||
signurl: contact.map(x => ({
|
||||
email: x.email,
|
||||
url: `${baseUrl.origin}/loadmf/signmicroapp/login/${res.id}/${x.email}/${x.contactPtr.objectId}/${serverParams}`,
|
||||
})),
|
||||
message: 'Document sent successfully!',
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return response.status(400).json({ error: 'Please provide signers!' });
|
||||
|
||||
Reference in New Issue
Block a user