Closed Azaret closed 6 years ago
Side note: Since ranking calculation is done once, sorting and even the full ranking table could be done on the back side in SQL. EDIT: PIvot is too boring to do with mySQL, forget it.
Added endpoint /event/:id/user/:id/rank
with PUT
method and payload:
{
"rank": 0
}
The idea is to save the player rank into the database instead of calculating it on ranking display.
This aim to solve the issue of losing ranking of old event when the ranking calculation change from one event to another.
For the back part, this should be done:
INT
field on tableaccount_event_status
./event/:id/users
.For the front part:
refresh ranking
admin action, which would update ranking for all players (should be hidden when the event is over).