This commit is contained in:
2026-07-12 12:20:23 +08:00
parent 7f2d5579ff
commit f923791d39
252 changed files with 9872 additions and 647 deletions
+1 -21
View File
@@ -5,10 +5,7 @@ import {
parseAPIErrorResponse,
} from 'dashboard/store/utils/api';
import wootAPI from './apiClient';
import {
getLoginRedirectURL,
getCredentialsFromEmail,
} from '../helpers/AuthHelper';
import { getLoginRedirectURL } from '../helpers/AuthHelper';
export const login = async ({
ssoAccountId,
@@ -49,23 +46,6 @@ export const login = async ({
}
};
export const register = async creds => {
try {
const { fullName, accountName } = getCredentialsFromEmail(creds.email);
const response = await wootAPI.post('api/v1/accounts.json', {
account_name: accountName,
user_full_name: fullName,
email: creds.email,
password: creds.password,
h_captcha_client_response: creds.hCaptchaClientResponse,
});
return response.data;
} catch (error) {
throwErrorMessage(error);
}
return null;
};
export const resendConfirmation = async ({ email, hCaptchaClientResponse }) => {
return wootAPI.post('resend_confirmation', {
email,