File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed
main/java/org/gridsuite/shortcircuit/server
test/java/org/gridsuite/shortcircuit/server Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -114,19 +114,11 @@ public ResponseEntity<Page<FeederResult>> getPagedFeederResults(@Parameter(descr
114
114
: ResponseEntity .notFound ().build ();
115
115
}
116
116
117
- @ DeleteMapping (value = "/results/{resultUuid}" , produces = APPLICATION_JSON_VALUE )
118
- @ Operation (summary = "Delete a short circuit analysis result from the database" )
119
- @ ApiResponses (value = {@ ApiResponse (responseCode = "200" , description = "The short circuit analysis result has been deleted" )})
120
- public ResponseEntity <Void > deleteResult (@ Parameter (description = "Result UUID" ) @ PathVariable ("resultUuid" ) UUID resultUuid ) {
121
- shortCircuitService .deleteResult (resultUuid );
122
- return ResponseEntity .ok ().build ();
123
- }
124
-
125
117
@ DeleteMapping (value = "/results" , produces = APPLICATION_JSON_VALUE )
126
- @ Operation (summary = "Delete all short circuit analysis results from the database" )
118
+ @ Operation (summary = "Delete short circuit analysis results from the database" )
127
119
@ ApiResponses (value = {@ ApiResponse (responseCode = "200" , description = "All short circuit analysis results have been deleted" )})
128
- public ResponseEntity <Void > deleteResults () {
129
- shortCircuitService .deleteResults ();
120
+ public ResponseEntity <Void > deleteResults (@ Parameter ( description = "Results UUID" ) @ RequestParam ( value = "resultsUuids" , required = false ) List < UUID > resultsUuids ) {
121
+ shortCircuitService .deleteResults (resultsUuids );
130
122
return ResponseEntity .ok ().build ();
131
123
}
132
124
Original file line number Diff line number Diff line change @@ -480,7 +480,7 @@ void runTest() throws Exception {
480
480
.andExpect (status ().isNotFound ());
481
481
482
482
// test one result deletion
483
- mockMvc .perform (delete ("/" + VERSION + "/results/{resultUuid}" , RESULT_UUID ))
483
+ mockMvc .perform (delete ("/" + VERSION + "/results" ). queryParam ( "resultsUuids" , RESULT_UUID . toString () ))
484
484
.andExpect (status ().isOk ());
485
485
486
486
mockMvc .perform (get ("/" + VERSION + "/results/{resultUuid}" , RESULT_UUID ))
@@ -886,7 +886,7 @@ void checkShortCircuitLimitsTest() throws Exception {
886
886
assertEquals (200.0 , resultDto .getFaults ().get (0 ).getShortCircuitLimits ().getIpMax (), 0.1 );
887
887
assertEquals (10.5 , resultDto .getFaults ().get (1 ).getShortCircuitLimits ().getIpMin (), 0.1 );
888
888
assertEquals (200.0 , resultDto .getFaults ().get (1 ).getShortCircuitLimits ().getIpMax (), 0.1 );
889
- mockMvc .perform (delete ("/" + VERSION + "/results/{resultUuid}" , RESULT_UUID ))
889
+ mockMvc .perform (delete ("/" + VERSION + "/results" ). queryParam ( "resultsUuids" , RESULT_UUID . toString () ))
890
890
.andExpect (status ().isOk ());
891
891
892
892
mockMvc .perform (post (
You can’t perform that action at this time.
0 commit comments