fix: aff not effective

This commit is contained in:
Martial BE 2024-01-15 14:18:03 +08:00
parent eed9f5fdf0
commit 683b7cfd42
No known key found for this signature in database
GPG Key ID: D06C32DF0EDB9084

View File

@ -6,6 +6,10 @@ const useRegister = () => {
const navigate = useNavigate();
const register = async (input, turnstile) => {
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 { success, message } = res.data;
if (success) {