mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-30 13:34:58 +02:00
Merge pull request #1218 from OpenSignLabs/validation
This commit is contained in:
@@ -197,7 +197,7 @@ export default async function createDocumentWithTemplate(request, response) {
|
|||||||
object.set('TimeToCompleteDays', TimeToCompleteDays);
|
object.set('TimeToCompleteDays', TimeToCompleteDays);
|
||||||
}
|
}
|
||||||
const enableOTP = request.body?.enableOTP === true ? true : false;
|
const enableOTP = request.body?.enableOTP === true ? true : false;
|
||||||
const IsEnableOTP = template?.IsEnableOTP || enableOTP;
|
const IsEnableOTP = enableOTP || template?.IsEnableOTP || false;
|
||||||
object.set('IsEnableOTP', IsEnableOTP);
|
object.set('IsEnableOTP', IsEnableOTP);
|
||||||
object.set('CreatedBy', template.CreatedBy);
|
object.set('CreatedBy', template.CreatedBy);
|
||||||
object.set('ExtUserPtr', {
|
object.set('ExtUserPtr', {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export default async function callWebhook(request) {
|
|||||||
const docRes = await docQuery.get(docId, { useMasterKey: true });
|
const docRes = await docQuery.get(docId, { useMasterKey: true });
|
||||||
const isEnableOTP = docRes?.get('IsEnableOTP') || false;
|
const isEnableOTP = docRes?.get('IsEnableOTP') || false;
|
||||||
let userId;
|
let userId;
|
||||||
if (!isEnableOTP) {
|
if (isEnableOTP) {
|
||||||
const userRes = await axios.get(serverUrl + '/users/me', {
|
const userRes = await axios.get(serverUrl + '/users/me', {
|
||||||
headers: {
|
headers: {
|
||||||
'X-Parse-Application-Id': appId,
|
'X-Parse-Application-Id': appId,
|
||||||
|
|||||||
Reference in New Issue
Block a user