forked from MinecraftUtilities/Backend
cleanup username to uuid endpoint
This commit is contained in:
parent
a11a90f530
commit
557c0facb7
@ -40,13 +40,9 @@ public class PlayerController {
|
|||||||
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@GetMapping(value = "/uuid/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
|
@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) {
|
@Parameter(description = "The UUID or Username of the player", example = "ImFascinated") @PathVariable String id) {
|
||||||
CachedPlayerName player = playerService.usernameToUuid(id);
|
return playerService.usernameToUuid(id);
|
||||||
return ResponseEntity.ok(Map.of(
|
|
||||||
"username", player.getUsername(),
|
|
||||||
"uuid", player.getUniqueId()
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/{part}/{id}")
|
@GetMapping(value = "/{part}/{id}")
|
||||||
|
Loading…
Reference in New Issue
Block a user