From 557c0facb7cee676e1d07a157d54e49a9a3884de Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 11 Apr 2024 00:50:57 +0100 Subject: [PATCH] cleanup username to uuid endpoint --- .../java/cc.fascinated/controller/PlayerController.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/cc.fascinated/controller/PlayerController.java b/src/main/java/cc.fascinated/controller/PlayerController.java index f027319..d8d7b95 100644 --- a/src/main/java/cc.fascinated/controller/PlayerController.java +++ b/src/main/java/cc.fascinated/controller/PlayerController.java @@ -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}")