Skip to content

Commit 56ef2c0

Browse files
author
Hugo Marcellin
committed
Swap delete for put and update URI
1 parent b79724d commit 56ef2c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/org/gridsuite/studyconfig/server/controller/SpreadsheetConfigController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public ResponseEntity<Void> setGlobalFiltersForSpreadsheetConfig(
213213
return ResponseEntity.noContent().build();
214214
}
215215

216-
@DeleteMapping("/{id}/columns/filters")
216+
@PutMapping("/{id}/reset-filters")
217217
@Operation(summary = "Reset global and column filters",
218218
description = "Reset all columns filters in a spreadsheet configuration as well as the global filter")
219219
@ApiResponse(responseCode = "204", description = "Filters reset successfully")

src/test/java/org/gridsuite/studyconfig/server/SpreadsheetConfigIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ void testResetFiltersForSpreadsheetConfig() throws Exception {
561561
assertThat(initialConfig.columns().getFirst()).hasFieldOrPropertyWithValue("filterValue", "test-value");
562562

563563
// Call the endpoint to reset the filters
564-
mockMvc.perform(delete(URI_SPREADSHEET_CONFIG_GET_PUT + configId + URI_COLUMN_BASE + "/filters")
564+
mockMvc.perform(put(URI_SPREADSHEET_CONFIG_GET_PUT + configId + "/reset-filters")
565565
.contentType(MediaType.APPLICATION_JSON))
566566
.andExpect(status().isNoContent());
567567

0 commit comments

Comments
 (0)