#Making the same post request 3 times

7 messages · Page 1 of 1 (latest)

lean scroll
#

Hi, i have a quiz app. At the end of the quiz, I show the user's results and update the completion number property in the mongoDB backend.

I am noticing that the component is making the PATCH request 3 times, therefore tripling the completion number. How can i prevent this behaviour?

Thank you!

kindred ospreyBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

marsh wren
#

instead of calling like this

lean scroll
marsh wren
#

and you don't need async there cause your updateData is an async func