fix: set random session id by default

pull/24/head
hanchchch 1 year ago
parent 40359dce30
commit 789af24b5f

@ -28,5 +28,8 @@
</div>
</div>
</div>
<script>
setRandomSessionId();
</script>
</div>
{% endblock %}

@ -33,3 +33,8 @@ const submit = async () => {
const { answer } = await response.json();
document.getElementById("answer").textContent = answer;
};
const setRandomSessionId = () => {
const sessionId = Math.random().toString(36).substring(2, 15);
document.getElementById("session").value = sessionId;
};

Loading…
Cancel
Save