change cloud function name getContractUser to getUserDetails

This commit is contained in:
prafull-opensignlabs
2023-11-16 11:00:49 +05:30
parent 48d3166049
commit 45d65cfbe2
6 changed files with 8 additions and 8 deletions
@@ -46,7 +46,7 @@ const LoginFacebook = ({
// extUser.equalTo("Email", details.Email);
// const extRes = await extUser.first();
const params = { email: details.Email };
const extRes = await Parse.Cloud.run("getContractUser", params);
const extRes = await Parse.Cloud.run("getUserDetails", params);
// console.log("extRes ", extRes);
if (extRes) {
const params = { ...details, Phone: extRes.get("Phone") };
+1 -1
View File
@@ -70,7 +70,7 @@ const GoogleSignInBtn = ({
// extUser.equalTo("Email", details.Gmail);
// const extRes = await extUser.first();
const params = { email: details.Gmail };
const extRes = await Parse.Cloud.run("getContractUser", params);
const extRes = await Parse.Cloud.run("getUserDetails", params);
// console.log("extRes ", extRes);
if (extRes) {
const params = { ...details, Phone: extRes.get("Phone") };
+1 -1
View File
@@ -68,7 +68,7 @@ const PgSignUp = (props) => {
const extClass = userSettings[0].extended_class;
// console.log("extClass ", extClass);
const params = { email: userDetails.email };
const res = await Parse.Cloud.run("getContractUser", params);
const res = await Parse.Cloud.run("getUserDetails", params);
// console.log("res", res);
if (res) {
const checkUser = new Parse.Query(extClass);
+1 -1
View File
@@ -102,7 +102,7 @@ const Signup = (props) => {
.catch(async (err) => {
if (err.code === 202) {
const params = { email: email };
const res = await Parse.Cloud.run("getContractUser", params);
const res = await Parse.Cloud.run("getUserDetails", params);
// console.log("Res ", res);
if (res) {
alert("User already exists with this username!");
+2 -2
View File
@@ -13,7 +13,7 @@ import sendMailOTPv1 from './parsefunction/SendMailOTPv1.js';
import SendMailv1 from './parsefunction/SendMailv1.js';
import AuthLoginAsMail from './parsefunction/AuthLoginAsMail.js';
import getUserId from './parsefunction/getUserId.js';
import getContractUser from './parsefunction/getContractUser.js';
import getUserDetails from './parsefunction/getUserDetails.js';
Parse.Cloud.define('AddUserToRole', addUserToGroups);
Parse.Cloud.define('UserGroups', getUserGroups);
@@ -30,4 +30,4 @@ Parse.Cloud.define('SendOTPMailV1', sendMailOTPv1);
Parse.Cloud.define('sendmail', SendMailv1);
Parse.Cloud.define('AuthLoginAsMail', AuthLoginAsMail);
Parse.Cloud.define('getUserId', getUserId);
Parse.Cloud.define('getContractUser', getContractUser);
Parse.Cloud.define('getUserDetails', getUserDetails);
@@ -1,4 +1,4 @@
async function getContractUser(request) {
async function getUserDetails(request) {
try {
const userQuery = new Parse.Query('contracts_Users');
userQuery.equalTo('Email', request.params.email);
@@ -9,4 +9,4 @@ async function getContractUser(request) {
return err;
}
}
export default getContractUser;
export default getUserDetails;