diff --git a/src/pages/User/DetailPage/LoginGrid.js b/src/pages/User/DetailPage/LoginGrid.js index cd7240a..23884fb 100644 --- a/src/pages/User/DetailPage/LoginGrid.js +++ b/src/pages/User/DetailPage/LoginGrid.js @@ -12,7 +12,7 @@ import {useTheme} from "@emotion/react"; // ==============================|| EVENT TABLE ||============================== // -export default function LoginGrid({userId}) { +export default function LoginGrid({u1}) { // const navigate = useNavigate() const theme = useTheme(); const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); @@ -64,7 +64,7 @@ export default function LoginGrid({userId}) { getRowHeight={() => 'auto'} doLoad={{ url:GET_LOGIN_LOG_LIST, - params:{userId:userId} + params:{u1:u1} }} /> diff --git a/src/pages/User/DetailPage/index.js b/src/pages/User/DetailPage/index.js index 86c0570..8f0da7b 100644 --- a/src/pages/User/DetailPage/index.js +++ b/src/pages/User/DetailPage/index.js @@ -230,7 +230,7 @@ const UserMaintainPage = () => { HttpUtils.get({ url: `${GET_LOGIN_LOG_LIST}`, params: { - userId: params.id + u1: params.id }, onSuccess: function (response) { // console.log(response) @@ -408,7 +408,7 @@ const UserMaintainPage = () => { diff --git a/src/pages/User/DetailsPage_Individual/LoginGrid.js b/src/pages/User/DetailsPage_Individual/LoginGrid.js index ea7660b..2319316 100644 --- a/src/pages/User/DetailsPage_Individual/LoginGrid.js +++ b/src/pages/User/DetailsPage_Individual/LoginGrid.js @@ -10,7 +10,7 @@ import {useTheme} from "@emotion/react"; // ==============================|| EVENT TABLE ||============================== // -export default function LoginGrid({userId}) { +export default function LoginGrid({u1}) { // const navigate = useNavigate() const theme = useTheme(); const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); @@ -61,7 +61,7 @@ export default function LoginGrid({userId}) { getRowHeight={() => 'auto'} doLoad={{ url:GET_LOGIN_LOG_LIST, - params:{userId:userId} + params:{u1:u1} }} /> diff --git a/src/pages/User/DetailsPage_Individual/index.js b/src/pages/User/DetailsPage_Individual/index.js index 3a1af5e..d6ce7af 100644 --- a/src/pages/User/DetailsPage_Individual/index.js +++ b/src/pages/User/DetailsPage_Individual/index.js @@ -192,7 +192,7 @@ const UserMaintainPage_Individual = () => { diff --git a/src/pages/User/DetailsPage_Organization/LoginGrid.js b/src/pages/User/DetailsPage_Organization/LoginGrid.js index ba059da..278972b 100644 --- a/src/pages/User/DetailsPage_Organization/LoginGrid.js +++ b/src/pages/User/DetailsPage_Organization/LoginGrid.js @@ -12,7 +12,7 @@ import {GET_LOGIN_LOG_LIST } from "utils/ApiPathConst"; // ==============================|| EVENT TABLE ||============================== // -export default function LoginGrid({userId}) { +export default function LoginGrid({u1}) { // const navigate = useNavigate() const theme = useTheme(); const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); @@ -63,7 +63,7 @@ export default function LoginGrid({userId}) { getRowHeight={() => 'auto'} doLoad={{ url:GET_LOGIN_LOG_LIST, - params:{userId:userId} + params:{u1:u1} }} /> diff --git a/src/pages/User/DetailsPage_Organization/index.js b/src/pages/User/DetailsPage_Organization/index.js index 94843d2..41a5d78 100644 --- a/src/pages/User/DetailsPage_Organization/index.js +++ b/src/pages/User/DetailsPage_Organization/index.js @@ -261,7 +261,7 @@ const UserMaintainPage_Organization = () => { diff --git a/src/pages/authentication/BusRegister.js b/src/pages/authentication/BusRegister.js index cd30c5e..1648237 100644 --- a/src/pages/authentication/BusRegister.js +++ b/src/pages/authentication/BusRegister.js @@ -21,7 +21,7 @@ import { notifyActionError } from 'utils/CommonFunction'; const CustomFormWizard = Loadable(lazy(() => import('./auth-forms/BusCustomFormWizard'))); const AuthWrapper = Loadable(lazy(() => import('./AuthWrapperCustom'))); import axios from "axios"; -import { GET_USERNAME, POST_VERIFY_CAPTCHA } from "utils/ApiPathConst"; +import { POST_USERNAME, POST_VERIFY_CAPTCHA } from "utils/ApiPathConst"; import {FormattedMessage, useIntl} from "react-intl"; // import CustomFormWizard from './auth-forms/BusCustomFormWizard'; // import AuthWrapper from './AuthWrapperCustom'; @@ -83,10 +83,8 @@ const BusRegister = () => { }; const handleCheckUsername = async () => { - const response = await axios.get(`${GET_USERNAME}`, { - params: { - username: username, - } + const response = await axios.post(`${POST_USERNAME}`, { + u1: username, }) return Number(response.data[0]) === 1 } diff --git a/src/pages/authentication/Register.js b/src/pages/authentication/Register.js index 02f87ee..e36e96b 100644 --- a/src/pages/authentication/Register.js +++ b/src/pages/authentication/Register.js @@ -15,7 +15,7 @@ import { Button, StepLabel, } from '@mui/material'; import VisibilityIcon from '@mui/icons-material/Visibility'; -import { GET_USERNAME, POST_VERIFY_CAPTCHA } from "utils/ApiPathConst"; +import { POST_USERNAME, POST_VERIFY_CAPTCHA } from "utils/ApiPathConst"; // project import import Loadable from 'components/Loadable'; @@ -83,10 +83,8 @@ const Register = () => { }; const handleCheckUsername = async () => { - const response = await axios.get(`${GET_USERNAME}`, { - params: { - username: username, - } + const response = await axios.post(`${POST_USERNAME}`, { + u1: username, }) return Number(response.data[0]) === 1 } diff --git a/src/pages/authentication/auth-forms/BusCustomFormWizard.js b/src/pages/authentication/auth-forms/BusCustomFormWizard.js index c696c4f..298e707 100644 --- a/src/pages/authentication/auth-forms/BusCustomFormWizard.js +++ b/src/pages/authentication/auth-forms/BusCustomFormWizard.js @@ -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 diff --git a/src/pages/authentication/auth-forms/CustomFormWizard.js b/src/pages/authentication/auth-forms/CustomFormWizard.js index 6fc258e..f0cfbf2 100644 --- a/src/pages/authentication/auth-forms/CustomFormWizard.js +++ b/src/pages/authentication/auth-forms/CustomFormWizard.js @@ -25,7 +25,7 @@ import * as yup from 'yup'; import { strengthColorChi, strengthIndicator } from 'utils/password-strength'; // import {apiPath} from "auth/utils"; import axios from "axios"; -import { GET_USERNAME, GET_USER_EMAIL, POST_CAPTCHA, POST_PUBLIC_USER_REGISTER } from "utils/ApiPathConst"; +import { POST_USERNAME, POST_USER_EMAIL, POST_CAPTCHA, POST_PUBLIC_USER_REGISTER } from "utils/ApiPathConst"; // import * as HttpUtils from 'utils/HttpUtils'; import * as ComboData from "utils/ComboData"; @@ -123,10 +123,8 @@ const CustomFormWizard = (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 @@ -135,10 +133,8 @@ const CustomFormWizard = (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 diff --git a/src/pages/authentication/auth-forms/IAmSmartFormWizard.js b/src/pages/authentication/auth-forms/IAmSmartFormWizard.js index c306237..69ff9f5 100644 --- a/src/pages/authentication/auth-forms/IAmSmartFormWizard.js +++ b/src/pages/authentication/auth-forms/IAmSmartFormWizard.js @@ -21,7 +21,7 @@ import { useFormik, FormikProvider } from 'formik'; import * as yup from 'yup'; import axios from "axios"; -import { POST_IAMSMART_USER_REGISTER, POST_CAPTCHA, GET_USER_EMAIL } from "utils/ApiPathConst"; +import { POST_IAMSMART_USER_REGISTER, POST_CAPTCHA, POST_USER_EMAIL } from "utils/ApiPathConst"; import * as ComboData from "utils/ComboData"; @@ -185,10 +185,8 @@ const CustomFormWizard = (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 diff --git a/src/utils/ApiPathConst.js b/src/utils/ApiPathConst.js index 531ddc8..9a88d94 100644 --- a/src/utils/ApiPathConst.js +++ b/src/utils/ApiPathConst.js @@ -88,8 +88,8 @@ export const GET_COMBO = apiPath+'/combo-data'; //register export const POST_PUBLIC_USER_REGISTER = apiPath+'/user/register'; export const POST_IAMSMART_USER_REGISTER = apiPath+'/user/smart/register'; -export const GET_USERNAME = apiPath+'/user/username'; -export const GET_USER_EMAIL = apiPath+'/user/email'; +export const POST_USERNAME = apiPath+'/user/checkU1'; +export const POST_USER_EMAIL = apiPath+'/user/checkE1'; export const GET_ID = apiPath+'/user/verifyID'; export const GET_VERIFY_USER_ACCOUNT = apiPath+'/user/verifyEmail'; export const GET_FORGOT_PASSWORD_VERIFY_USER_ACCOUNT = apiPath+'/user/verifyForgotPasswordEmail';