Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handleDelete for quiz missing captcha #147

Open
drnareshchauhan opened this issue Feb 24, 2022 · 0 comments
Open

handleDelete for quiz missing captcha #147

drnareshchauhan opened this issue Feb 24, 2022 · 0 comments

Comments

@drnareshchauhan
Copy link

const handleDelete = async () => {
let token = localStorage.getItem('authToken');
let url = http://localhost:8000/quiz/delete;
let captcha = await executeRecaptcha('quiz_delete');
let data = {
quizId: quizId,
captcha: captcha,
};

try {
  await axios
    .delete(url, {
      headers: {
        'auth-token': token,
      },
      data: data,
    })
    .then((res) => {
      setRedirect(true);
    });
} catch (error) {
  console.log(error);
}

};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant