fix: fix aff not effective (#937)
This commit is contained in:
parent
eed9f5fdf0
commit
e2ed0399f0
@ -6,6 +6,10 @@ const useRegister = () => {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const register = async (input, turnstile) => {
|
const register = async (input, turnstile) => {
|
||||||
try {
|
try {
|
||||||
|
let affCode = localStorage.getItem('aff');
|
||||||
|
if (affCode) {
|
||||||
|
input = { ...input, aff_code: affCode };
|
||||||
|
}
|
||||||
const res = await API.post(`/api/user/register?turnstile=${turnstile}`, input);
|
const res = await API.post(`/api/user/register?turnstile=${turnstile}`, input);
|
||||||
const { success, message } = res.data;
|
const { success, message } = res.data;
|
||||||
if (success) {
|
if (success) {
|
||||||
|
Loading…
Reference in New Issue
Block a user