uwbaddev / baddie-match

Web app to track our badminton matches
2 stars 2 forks source link

Add elo to backend #38

Closed ivanccheng closed 1 year ago

ivanccheng commented 1 year ago

Changes: Added player elo to backend Move stats endpoint into own file

new endpoints:

/api/elo/singles
/api/elo/doubles

Since calculating elo is computationally expensive, on first request, the application computes elos and stores as a attribute in the player_elo class. Then from then on, every request returns the stored attribute. The stored attribute is updated every night at 11pm.