Closed trouni closed 1 year ago
@dmbf29 If you can review this, we could merge it to production already as it shouldn't break the current FE (you should probably test this locally against the main
branch of the FE to make sure).
You will need to run this locally to make sure the leaderboard owner has a regular membership:
Leaderboard.find_each { |leaderboard| leaderboard.memberships.create(user: leaderboard.user) }
@trouni do i need to run
Leaderboard.find_each { |leaderboard| leaderboard.memberships.create(user: leaderboard.user) }
in production then as well?
Yes indeed. It's just so that you and me (and other leaderboard owners) can still see the leaderboards that we created.
I'll wait a little bit to merge actually. I fixed some bugs while @jjmountain was developing, so just in case we find some other issues, I'll delay the merge.
This PR implements the following work:
results
hash in the leaderboard response object, containing the IDs of users based on their prediction for each match ID. These predictions are included for all "locked" games (= games that have been started or completed).As a post-deploy task, this needs to be run in the Heroku console after deployment to create the memberships for the leaderboard owners:
Fixes #98