Skip to content

Commit

Permalink
dont use an immutable map
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbranham committed Sep 23, 2024
1 parent 7eb9795 commit 54badad
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.savantly.nexus.flow.api;

import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
Expand Down Expand Up @@ -68,7 +69,8 @@ public ResponseEntity submitFormJson(@PathVariable String formId, @RequestBody O
if (payload instanceof Map) {
payloadMap = (Map<String, Object>) payload;
} else if (List.class.isAssignableFrom(payload.getClass())) {
payloadMap = Map.of("payload_array", payload);
payloadMap = new HashMap<String, Object>();
payloadMap.put("payload_array", payload);
} else {
payloadMap = mapper.readValue(mapper.writeValueAsString(payload), Map.class);
}
Expand Down

0 comments on commit 54badad

Please sign in to comment.