/api/captcha/:id now is of a POST method.
This commit is contained in:
parent
66be82d6b2
commit
2f6bff16b9
@ -25,13 +25,13 @@ captcha_refresh.addEventListener("click", async e => {
|
|||||||
e.target.disabled = true;
|
e.target.disabled = true;
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
e.target.disabled = false;
|
e.target.disabled = false;
|
||||||
await fetch(`/api/captcha/${g_current_captcha_id}?remove`); }, 3000);
|
await fetch(`/api/captcha/${g_current_captcha_id}?remove`, { method: "POST"}); }, 3000);
|
||||||
e_captcha.children[2].value = "";
|
e_captcha.children[2].value = "";
|
||||||
await getNewCaptcha();
|
await getNewCaptcha();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Remove unused CAPTCHA on a server.
|
// Remove unused CAPTCHA on a server.
|
||||||
window.addEventListener("unload", () => fetch(`/api/captcha/${g_current_captcha_id}?remove`));
|
window.addEventListener("unload", () => fetch(`/api/captcha/${g_current_captcha_id}?remove`, { method: "POST"}));
|
||||||
|
|
||||||
setInterval(async () => {
|
setInterval(async () => {
|
||||||
captcha_remain.innerText = --g_captcha_timeout_remain;
|
captcha_remain.innerText = --g_captcha_timeout_remain;
|
||||||
|
Loading…
Reference in New Issue
Block a user