pls work
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 2m6s

This commit is contained in:
Lee 2024-04-20 20:10:41 +01:00
parent b5fa470801
commit c5b5b3b105

@ -43,7 +43,7 @@ public class ServerController {
@ResponseBody @ResponseBody
@GetMapping(value = "/icon/{hostname}", produces = MediaType.IMAGE_PNG_VALUE) @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 = "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) { @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"; String dispositionHeader = download ? "attachment; filename=%s.png" : "inline; filename=%s.png";
@ -58,7 +58,7 @@ public class ServerController {
@ResponseBody @ResponseBody
@GetMapping(value = "/{platform}/preview/{hostname}", produces = MediaType.IMAGE_PNG_VALUE) @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 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 = "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, @Parameter(description = "Whether to download the image") @RequestParam(required = false, defaultValue = "false") boolean download,