fix: weird question answering bug

This commit is contained in:
trisua 2025-04-24 21:18:51 -04:00
parent 9e6c5c9726
commit 4cafea66aa
2 changed files with 4 additions and 4 deletions

View file

@ -59,7 +59,7 @@
<script> <script>
const community = "{{ question.community }}"; const community = "{{ question.community }}";
async function answer_question_from_form(e, answering) { window.answer_question_from_form = async (e, answering) => {
e.preventDefault(); e.preventDefault();
await trigger("atto::debounce", ["posts::create"]); await trigger("atto::debounce", ["posts::create"]);
fetch("/api/v1/posts", { fetch("/api/v1/posts", {
@ -84,6 +84,6 @@
window.location.reload(); window.location.reload();
} }
}); });
} };
</script> </script>
{% endblock %} {% endblock %}

View file

@ -163,7 +163,7 @@
}); });
} }
async function answer_question_from_form(e, answering) { window.answer_question_from_form = async (e, answering) => {
e.preventDefault(); e.preventDefault();
await trigger("atto::debounce", ["posts::create"]); await trigger("atto::debounce", ["posts::create"]);
fetch("/api/v1/posts", { fetch("/api/v1/posts", {
@ -188,7 +188,7 @@
e.target.parentElement.remove(); e.target.parentElement.remove();
} }
}); });
} };
globalThis.accept_follow_request = async (e, id) => { globalThis.accept_follow_request = async (e, id) => {
await trigger("atto::debounce", ["users::follow"]); await trigger("atto::debounce", ["users::follow"]);