From 6964e0bc8578abcbdf7e49ffa36c49197df67787 Mon Sep 17 00:00:00 2001 From: Szymon Szukalski Date: Tue, 23 Jul 2024 21:25:54 +1000 Subject: Enforce text/xml+marker content type for /import endpoint --- .../com/stileeducation/markr/controller/TestResultsController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/stileeducation/markr/controller') diff --git a/src/main/java/com/stileeducation/markr/controller/TestResultsController.java b/src/main/java/com/stileeducation/markr/controller/TestResultsController.java index f5f8a44..5667027 100644 --- a/src/main/java/com/stileeducation/markr/controller/TestResultsController.java +++ b/src/main/java/com/stileeducation/markr/controller/TestResultsController.java @@ -20,8 +20,8 @@ public class TestResultsController { this.testResultsService = testResultsService; } - // TODO - update to consume text/xml+markr, consider return value - @PostMapping(value = IMPORT_ENDPOINT, consumes = "application/xml", produces = "application/json") + // TODO consider return value + @PostMapping(value = IMPORT_ENDPOINT, consumes = "text/xml+markr", produces = "application/json") public ResponseEntity handleXmlRequest(@RequestBody MCQTestResultsDTO testResults) { testResultsService.importTestResults(testResults); return new ResponseEntity<>(HttpStatus.NO_CONTENT); -- cgit v1.2.3