cleanup username to uuid endpoint
Some checks failed
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Failing after 22s

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}")