General description
Add /battleQueue GET endpoint, which should return all online players, which have the status BattleWait. The endpoint should also sort the players in increasing order based on the queueNumber field
Things to notice
The queueNumber field has a limitation of how big it can be, which is 9999, after that the number is reset to zero. The sorting must take this into account and so, if there are a players with number 9999 and number 1, the 1 should go after the 9999 number.
Tasks
General description
Add /battleQueue GET endpoint, which should return all online players, which have the status
BattleWait. The endpoint should also sort the players in increasing order based on thequeueNumberfieldThings to notice
The
queueNumberfield has a limitation of how big it can be, which is 9999, after that the number is reset to zero. The sorting must take this into account and so, if there are a players with number 9999 and number 1, the 1 should go after the 9999 number.Tasks