Skip to content

Commit f065589

Browse files
change response of createdocument API
1 parent f9e5990 commit f065589

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -233,19 +233,14 @@ export default async function createDocumentwithCoordinate(request, response) {
233233
}
234234

235235
if (sendMail.data.result.status === 'success') {
236-
const user = contact.find(x => x.email === parseExtUser.Email);
237-
if (user && user.email) {
238-
return response.json({
239-
objectId: res.id,
240-
url: `${baseUrl.origin}/loadmf/signmicroapp/login/${res.id}/${user.email}/${user.contactPtr.objectId}/${serverParams}`,
241-
message: 'Document sent successfully!',
242-
});
243-
} else {
244-
return response.json({
245-
objectId: res.id,
246-
message: 'Document sent successfully!',
247-
});
248-
}
236+
return response.json({
237+
objectId: res.id,
238+
signurl: contact.map(x => ({
239+
email: x.email,
240+
url: `${baseUrl.origin}/loadmf/signmicroapp/login/${res.id}/${x.email}/${x.contactPtr.objectId}/${serverParams}`,
241+
})),
242+
message: 'Document sent successfully!',
243+
});
249244
}
250245
} else {
251246
return response.status(400).json({ error: 'Please provide signers!' });

0 commit comments

Comments
 (0)