diff options
Diffstat (limited to 'cps-rest/src/main/java')
-rwxr-xr-x | cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java b/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java index 6100b7edd9..6015e0e3ae 100755 --- a/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java +++ b/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java @@ -95,9 +95,11 @@ public class DataRestController implements CpsDataApi { @Override public ResponseEntity<String> addListElements(final String apiVersion, final String dataspaceName, final String anchorName, final String parentNodeXpath, - final Object jsonData, final String observedTimestamp) { + final String contentTypeInHeader, final String nodeData, + final String observedTimestamp) { + final ContentType contentType = getContentTypeFromHeader(contentTypeInHeader); cpsDataService.saveListElements(dataspaceName, anchorName, parentNodeXpath, - jsonObjectMapper.asJsonString(jsonData), toOffsetDateTime(observedTimestamp)); + nodeData, toOffsetDateTime(observedTimestamp), contentType); return new ResponseEntity<>(HttpStatus.CREATED); } |