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

};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions