CloudNetService/CloudNet

API: /player/onlineCount and /player/{id} overlap

thxrben opened this issue · 1 comments

Stacktrace

No Stacktrace

Actions to reproduce

Create a 4.0.0-RC8 instance of Cloudnet.
Create an user with appropriate permissions to access the API and load the REST-Module.
Try accessing the /api/v2/players/onlineCount endpoint.

CloudNet version

4.0.0-RC8

Other

The API endpoints overlap.
The /onlineCount replies with:
{
"success": false,
"reason": "No player with provided uniqueId/name"
}
which is the reply given by /players/{id} if the Player given by {id} could not be found.

Possible Solution: A renaming has to take place, e.g. putting /players/player/{id} and /players/onlineCount as the endpoints (similar to the syntax in the console, e.g. "tasks task TaskName ..." ).

Issue uniqueness

  • Yes, this issue is unique. There are no similar issues.