mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-17 21:25:54 +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);
|
||||
}
|
||||
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('CreatedBy', template.CreatedBy);
|
||||
object.set('ExtUserPtr', {
|
||||
|
||||
@@ -12,7 +12,7 @@ export default async function callWebhook(request) {
|
||||
const docRes = await docQuery.get(docId, { useMasterKey: true });
|
||||
const isEnableOTP = docRes?.get('IsEnableOTP') || false;
|
||||
let userId;
|
||||
if (!isEnableOTP) {
|
||||
if (isEnableOTP) {
|
||||
const userRes = await axios.get(serverUrl + '/users/me', {
|
||||
headers: {
|
||||
'X-Parse-Application-Id': appId,
|
||||
|
||||
Reference in New Issue
Block a user