Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into react-tour

This commit is contained in:
RaktimaNXG
2024-09-30 12:35:11 +05:30
23 changed files with 259 additions and 174 deletions
@@ -51,7 +51,10 @@ export default async function UpdateExistUserAsAdmin(request) {
extClsQuery.notEqualTo('IsDisabled', true);
const extAdminRes = await extClsQuery.find({ useMasterKey: true });
if (extAdminRes && extAdminRes.length === 1 && extAdminRes?.[0]?.get('OrganizationId')) {
throw new Parse.Error(Parse.Error.DUPLICATE_VALUE, 'Admin already exist.');
throw new Parse.Error(
Parse.Error.DUPLICATE_VALUE,
'Admin already exists. Please login to the application using admin credentials in order to manage users.'
);
} else {
const extCls = new Parse.Query('contracts_Users');
extCls.equalTo('Email', email);