cleanup username to uuid endpoint

This commit is contained in:
Lee 2024-04-11 00:50:57 +01:00
parent a11a90f530
commit 557c0facb7

View File

@ -40,13 +40,9 @@ public class PlayerController {
@ResponseBody
@GetMapping(value = "/uuid/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<?> getPlayerUuid(
public CachedPlayerName getPlayerUuid(
@Parameter(description = "The UUID or Username of the player", example = "ImFascinated") @PathVariable String id) {
CachedPlayerName player = playerService.usernameToUuid(id);
return ResponseEntity.ok(Map.of(
"username", player.getUsername(),
"uuid", player.getUniqueId()
));
return playerService.usernameToUuid(id);
}
@GetMapping(value = "/{part}/{id}")