mirror of
https://github.com/demodude4u/Factorio-FBSR.git
synced 2025-02-19 19:59:54 +02:00
Fixed handling empty body
This commit is contained in:
parent
e465334c6e
commit
8ed174664d
@ -47,7 +47,7 @@ public class WebAPIService extends AbstractIdleService {
|
||||
On.post("/blueprint").serve((req, resp) -> {
|
||||
TaskReporting reporting = new TaskReporting();
|
||||
try {
|
||||
String content = new String(req.body());
|
||||
String content = Optional.ofNullable(req.body()).map(String::new).orElse("");
|
||||
reporting.setContext(content);
|
||||
|
||||
List<BlueprintStringData> blueprintStrings = BlueprintFinder.search(content, reporting);
|
||||
|
Loading…
x
Reference in New Issue
Block a user