Golf-Drill-Challenge-App / Golf-App

7 stars 0 forks source link

Check Update Leaderboard Logic #150

Closed solderq35 closed 5 months ago

solderq35 commented 6 months ago

When no one is on the leaderboard yet for a drill, the leaderboard updates as expected. When there is already someone else on the leaderboard, submitting a drill does not always update the leaderboard as expected. Check how updateLeaderboard hook is called

FrankreedX commented 6 months ago

When a drill is submitted, no leaderboard update is currently being triggered

solderq35 commented 6 months ago

Issues

solderq35 commented 6 months ago

Did some preliminary work on a branch (https://github.com/Golf-Drill-Challenge-App/Golf-App/pull/159), but after discussing with Jake we might move to a new PR (trying to trigger leaderboard update on drill submit) and just keep this for reference.

Gehrkej commented 6 months ago

I got the the functionality of updating upon a better score being submitted as well as when a user does not have an attempt for a given drill. A couple concerns around the "best_attempts" structure came up when implementing this. Please see #161 for more information and the implementation of this.