FightForSub / FFS-Api

Fight For Subs API
https://ffs-events.zerator.com/
GNU General Public License v3.0
15 stars 7 forks source link

Save rank into database #17

Closed Azaret closed 6 years ago

Azaret commented 6 years ago

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:

For the front part:

Azaret commented 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.

Azaret commented 6 years ago

Added endpoint /event/:id/user/:id/rank with PUT method and payload:

{
  "rank": 0
}