I have a question: I trigger the POST request upon the button click event. The API creates entries in the database and takes around 1 second on average. My issue is that users can press the button multiple times before the first API request is completed, creating numerous resources. I attempted to implement a pre-check before making any database changes and returning an exception which is then displayed on the UI with an appropriate message. I don't know whether it's the correct way to handle the problem. How can I prevent multiple API calls after the first one?
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)