Fixed a bug in the SetupRoute.java

This commit is contained in:
Mathias Wagner 2024-02-14 14:13:58 +01:00
parent a5f8b72c9b
commit 6a65daa579
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -31,6 +31,11 @@ public class SetupRoute extends DefaultHandler {
if (!isIntegerInBody(request, response, "memory")) return;
if (!isBooleanInBody(request, response, "autoStart")) return;
if (!versionManager.getInstallers().containsKey(getStringFromBody(request, "type"))) {
response.code(404).message("The server software could not be found");
return;
}
try {
String uuid = UUID.randomUUID().toString().split("-")[0];
MCDashWrapper.getDataSource("servers/" + uuid).mkdirs();