My website features an upvote button that users can press to register a vote. By pressing the button again, they can cancel their vote.
However, each time the button is pressed, it results in a database write operation. If someone were to use an autoclicker on the button repeatedly, it would lead to continuous calls to the database, which I want to avoid. What steps should I take to prevent this?
On a side note, when the upvote button is clicked, an ajax query is sent to the backend, which is powered by Django.