mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-17 21:25:54 +02:00
refactor: change variable from isDisableOTP to isEnableOTP
This commit is contained in:
@@ -286,9 +286,9 @@ async function PDF(req) {
|
||||
if (!resDoc) {
|
||||
throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'Document not found.');
|
||||
}
|
||||
const IsDisableOTP = resDoc?.get('IsDisableOTP') || false;
|
||||
// if `IsDisableOTP` is true then we don't have to check authentication
|
||||
if (!IsDisableOTP) {
|
||||
const IsEnableOTP = resDoc?.get('IsEnableOTP') || false;
|
||||
// if `IsEnableOTP` is false then we don't have to check authentication
|
||||
if (IsEnableOTP) {
|
||||
if (!req?.user) {
|
||||
throw new Parse.Error(Parse.Error.INVALID_SESSION_TOKEN, 'User is not authenticated.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user