Skip to content

handleDelete for quiz missing captcha #147

Description

@drnareshchauhan

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);
}

};

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions