RED-5256: added consumes to getDossierInformation-endpoint and changed it from GET to POST && dossiers were not filtered before getting dossier information, if filteredDossierId was empty
This commit is contained in:
parent
a428aa4c8a
commit
bd344d2c07
@ -26,7 +26,7 @@ public interface DossierResource {
|
||||
|
||||
String REST_PATH = "/dossier";
|
||||
String DOSSIER_TEMPLATE_PATH = "/dossier-template";
|
||||
String INFO_PATH = "/info";
|
||||
String INFO_PATH = "/dossier-info";
|
||||
String DELETED_DOSSIERS_PATH = "/deletedDossiers";
|
||||
String HARD_DELETE_PATH = "/hardDelete";
|
||||
String UNDELETE_PATH = "/undelete";
|
||||
@ -75,7 +75,7 @@ public interface DossierResource {
|
||||
@RequestParam(name = INCLUDE_DELETED_PARAM, defaultValue = "false", required = false) boolean includeDeleted);
|
||||
|
||||
|
||||
@GetMapping(value = REST_PATH + INFO_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@PostMapping(value = INFO_PATH, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
DossierInformation getDossierInformation(@RequestBody List<String> filteredDossierIds);
|
||||
|
||||
|
||||
|
||||
@ -144,7 +144,7 @@ public class DossierController implements DossierResource {
|
||||
DossierInformation dossierInformation = new DossierInformation();
|
||||
|
||||
var dossiers = dossierService.getAllDossiers();
|
||||
if (filteredDossierIds != null && !filteredDossierIds.isEmpty()) {
|
||||
if (filteredDossierIds != null) {
|
||||
dossiers = dossiers.stream().filter(d -> filteredDossierIds.contains(d.getId())).collect(Collectors.toList());
|
||||
}
|
||||
dossiers.forEach(d -> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user