You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2024/01/05 14:56:08 UTC

(streampipes) branch dev updated: fix: Add request body annotation to unit resource (#2395)

This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new 2620542c7 fix: Add request body annotation to unit resource (#2395)
2620542c7 is described below

commit 2620542c7d9dab89a7fad94f90f02db9e41d0619
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Fri Jan 5 15:56:04 2024 +0100

    fix: Add request body annotation to unit resource (#2395)
---
 .../java/org/apache/streampipes/rest/impl/connect/UnitResource.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/connect/UnitResource.java b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/connect/UnitResource.java
index 765f6ee4e..27404302a 100644
--- a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/connect/UnitResource.java
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/connect/UnitResource.java
@@ -27,6 +27,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -44,7 +45,7 @@ public class UnitResource extends AbstractAdapterResource<UnitMasterManagement>
       consumes = MediaType.APPLICATION_JSON_VALUE,
       produces = MediaType.APPLICATION_JSON_VALUE
   )
-  public ResponseEntity<?> getFittingUnits(UnitDescription unitDescription) {
+  public ResponseEntity<?> getFittingUnits(@RequestBody UnitDescription unitDescription) {
     try {
       String resultingJson = managementService.getFittingUnits(unitDescription);
       return ok(resultingJson);