benjf / wbwcp-mean

Port of the Wild Bor World Cup pool to the MEAN stack
MIT License
0 stars 0 forks source link

Remove points from users collection (and fix points totalling bug) #17

Closed arh1 closed 10 years ago

arh1 commented 10 years ago

The points total in the users collection is buggy: editing a match to save a result adds to the points value, even if the match has already been edited. (e.g. in the case of a result that was recorded incorrectly, editing again to fix the mistake will increase users.points.)

But stepping back, we really want to remove the points field from the users collection, for reasons of database normalization and to make the system less error-prone.

We already store the points along w/ the picks, and -- though it can be expensive to manipulate those number across all users/picks -- it's better to just keep the data there.

Assigning to you, Benj, since you recently made the change. Let me know your thoughts.

benjf commented 10 years ago

Fixed up w/ my recent commit on #7 - check the numbers please!

arh1 commented 10 years ago

Think we're good :)