Skip to content

Commit 10a7f40

Browse files
committed
fix(HttpServer): update command handling to process array input instead of string
1 parent cdce78c commit 10a7f40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mindustrytool/handlers/HttpServer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ public void init() {
180180
});
181181

182182
app.post("command", context -> {
183-
String commands = context.body();
184-
if (commands != null && !commands.isBlank()) {
185-
for (var command : commands.split("\n")) {
183+
String[] commands = context.bodyAsClass(String[].class);
184+
if (commands != null) {
185+
for (var command : commands) {
186186
ServerCommandHandler.getHandler().handleMessage(command);
187187
}
188188
}

0 commit comments

Comments
 (0)