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

riemer pushed a commit to branch fix-request-body-data-stream-resource
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit 949cca6fa9053e4c203a32ce30e57c429fb5bd36
Author: Dominik Riemer <[email protected]>
AuthorDate: Tue Jan 9 14:30:59 2024 +0100

    fix: Add RequestBody annotation to Data Stream resource
---
 .../java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java
 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java
index dac56f2f5..70822846f 100644
--- 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java
+++ 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java
@@ -34,6 +34,7 @@ import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 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;
 
@@ -79,7 +80,7 @@ public class DataStreamResource extends 
AbstractAuthGuardedRestResource {
       consumes = MediaType.APPLICATION_JSON_VALUE
   )
   @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE)
-  public ResponseEntity<?> addDataStream(SpDataStream dataStream) {
+  public ResponseEntity<?> addDataStream(@RequestBody SpDataStream dataStream) 
{
     try {
       getDataStreamResourceManager().add(dataStream, 
getAuthenticatedUserSid());
       return ok();

Reply via email to