Fix webserver not serving any map-assets (Fixes #549)

This commit is contained in:
Lukas Rieger (Blue) 2024-06-04 11:31:20 +02:00
parent 8f88dd7fd9
commit eeb01cba1a
No known key found for this signature in database
GPG Key ID: AA33883B1BBA03E6

View File

@ -95,7 +95,7 @@ public HttpResponse handle(HttpRequest request) {
case "textures.json" -> mapStorage.textures().read();
case "live/markers.json" -> mapStorage.markers().read();
case "live/players.json" -> mapStorage.players().read();
default -> null;
default -> path.startsWith("assets/") ? mapStorage.asset(path.substring(7)).read() : null;
};
if (in != null){
HttpResponse response = new HttpResponse(HttpStatusCode.OK);