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/09 14:00:31 UTC
(streampipes) branch dev updated: fix: Add RequestBody annotation to Data Stream resource (#2410)
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 fa9dc8928 fix: Add RequestBody annotation to Data Stream resource (#2410)
fa9dc8928 is described below
commit fa9dc8928e18e8fe8d763cf56fc8a1e5dfc365ab
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Tue Jan 9 15:00:25 2024 +0100
fix: Add RequestBody annotation to Data Stream resource (#2410)
---
.../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();