|
|
@@ -30,7 +30,7 @@ import * as yup from 'yup'; |
|
|
|
import { strengthColorChi, strengthIndicator } from 'utils/password-strength'; |
|
|
|
// import {apiPath} from "auth/utils"; |
|
|
|
import axios from "axios"; |
|
|
|
import { POST_PUBLIC_USER_REGISTER, POST_CAPTCHA, GET_USERNAME, GET_USER_EMAIL } from "utils/ApiPathConst"; |
|
|
|
import { POST_PUBLIC_USER_REGISTER, POST_CAPTCHA, POST_USERNAME, POST_USER_EMAIL } from "utils/ApiPathConst"; |
|
|
|
// import * as HttpUtils from 'utils/HttpUtils'; |
|
|
|
import * as ComboData from "utils/ComboData"; |
|
|
|
|
|
|
@@ -116,10 +116,8 @@ const BusCustomFormWizard = (props) => { |
|
|
|
|
|
|
|
const handleCheckUsername = async () => { |
|
|
|
if (values?.username) { |
|
|
|
const response = await axios.get(`${GET_USERNAME}`, { |
|
|
|
params: { |
|
|
|
username: values.username, |
|
|
|
} |
|
|
|
const response = await axios.post(`${POST_USERNAME}`, { |
|
|
|
u1: values.username, |
|
|
|
}) |
|
|
|
setCheckUsername((Number(response.data[0]) === 1)) |
|
|
|
return Number(response.data[0]) === 1 |
|
|
@@ -128,10 +126,8 @@ const BusCustomFormWizard = (props) => { |
|
|
|
|
|
|
|
const handleCheckEmail = async () => { |
|
|
|
if (values?.email) { |
|
|
|
const response = await axios.get(`${GET_USER_EMAIL}`, { |
|
|
|
params: { |
|
|
|
email: values.email, |
|
|
|
} |
|
|
|
const response = await axios.post(`${POST_USER_EMAIL}`, { |
|
|
|
e1: values.email, |
|
|
|
}) |
|
|
|
setCheckEmail((Number(response.data[0]) === 1)) |
|
|
|
return Number(response.data[0]) === 1 |
|
|
|