SecondThundeR / otaquiz

Anime quiz app. Built with T3 Stack. Powered by Shikimori API
https://otaquiz.ru
MIT License
2 stars 0 forks source link

fix: optimize answer DB update calls #16

Closed SecondThundeR closed 1 year ago

SecondThundeR commented 1 year ago

Currently, on EVERY answer click, app is pinging backend and writing current state of game answers to DB

This have been done initially, to ensure that players won't reset back to the beginning of the game to re-answer on page refresh

There is possible way to handle this: Detect browser's actions (Route change, Refresh, Tab close, etc.) and update game answers in DB (Of course, this includes updates at the end of the game)

SecondThundeR commented 1 year ago

Closed in https://github.com/SecondThundeR/otaquiz/commit/a180e9f596ff96c4b18fb15f9b138a7477d21867