mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-06 09:47:39 +02:00
change cloud function name getContractUser to getUserDetails
This commit is contained in:
@@ -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") };
|
||||
|
||||
@@ -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") };
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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!");
|
||||
|
||||
@@ -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);
|
||||
|
||||
+2
-2
@@ -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;
|
||||
Reference in New Issue
Block a user