forked from MinecraftUtilities/Backend
pls work
This commit is contained in:
parent
b5fa470801
commit
c5b5b3b105
@ -43,7 +43,7 @@ public class ServerController {
|
||||
|
||||
@ResponseBody
|
||||
@GetMapping(value = "/icon/{hostname}", produces = MediaType.IMAGE_PNG_VALUE)
|
||||
public ResponseEntity<?> getServerIcon(
|
||||
public ResponseEntity<byte[]> getServerIcon(
|
||||
@Parameter(description = "The hostname and port of the server", example = "aetheria.cc") @PathVariable String hostname,
|
||||
@Parameter(description = "Whether to download the image") @RequestParam(required = false, defaultValue = "false") boolean download) {
|
||||
String dispositionHeader = download ? "attachment; filename=%s.png" : "inline; filename=%s.png";
|
||||
@ -58,7 +58,7 @@ public class ServerController {
|
||||
|
||||
@ResponseBody
|
||||
@GetMapping(value = "/{platform}/preview/{hostname}", produces = MediaType.IMAGE_PNG_VALUE)
|
||||
public ResponseEntity<?> getServerPreview(
|
||||
public ResponseEntity<byte[]> getServerPreview(
|
||||
@Parameter(description = "The platform of the server", example = "java") @PathVariable String platform,
|
||||
@Parameter(description = "The hostname and port of the server", example = "aetheria.cc") @PathVariable String hostname,
|
||||
@Parameter(description = "Whether to download the image") @RequestParam(required = false, defaultValue = "false") boolean download,
|
||||
|
Loading…
x
Reference in New Issue
Block a user