File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/main/java/fr/insee/genesis/controller/rest/responses Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ public ResponseEntity<String> saveRawResponsesFromJsonBodyWithValidationDeprecat
147147
148148 @ Operation (summary = "Save lunatic json data from one interrogation in Genesis Database (with json " +
149149 "schema validation)" )
150- @ PutMapping (path ="/raw-responses" )
150+ @ PostMapping (path ="/raw-responses" )
151151 @ PreAuthorize ("hasRole('COLLECT_PLATFORM')" )
152152 public ResponseEntity <String > saveRawResponsesFromJsonBodyWithValidation (
153153 @ RequestBody Map <String , Object > body
@@ -174,6 +174,17 @@ public ResponseEntity<String> saveRawResponsesFromJsonBodyWithValidation(
174174 return ResponseEntity .ok ("Change this when ready" );
175175 }
176176
177+ @ Operation (summary = "Save lunatic json data from one interrogation in Genesis Database (with json " +
178+ "schema validation)" )
179+ @ PostMapping (path ="/raw-responses/dto" )
180+ @ PreAuthorize ("hasRole('COLLECT_PLATFORM')" )
181+ public ResponseEntity <String > saveRawResponsesFromRawResponseDto (
182+ @ RequestBody RawResponseDto dto
183+ ) {
184+ rawRepository .saveAsRawJson (dto );
185+ return ResponseEntity .ok ("Change this when ready" );
186+ }
187+
177188 //GET unprocessed
178189 @ Operation (summary = "Get campaign id and interrogationId from all unprocessed raw json data" )
179190 @ GetMapping (path = "/responses/raw/lunatic-json/get/unprocessed" )
You can’t perform that action at this time.
0 commit comments