File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
rest/resource-server/src/main/java/org/eclipse/sw360/rest/resourceserver/component Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 2222import io .swagger .v3 .oas .annotations .media .Schema ;
2323import io .swagger .v3 .oas .annotations .responses .ApiResponse ;
2424import io .swagger .v3 .oas .annotations .security .SecurityRequirement ;
25+ import org .apache .commons .lang3 .StringUtils ;
2526import org .eclipse .sw360 .datahandler .common .CommonUtils ;
2627import org .eclipse .sw360 .datahandler .common .SW360Constants ;
2728import org .eclipse .sw360 .datahandler .common .SW360Utils ;
@@ -426,9 +427,14 @@ public ResponseEntity<EntityModel<Component>> patchComponent(
426427 @ RequestMapping (value = COMPONENTS_URL + "/{ids}" , method = RequestMethod .DELETE )
427428 public ResponseEntity <List <MultiStatus >> deleteComponents (
428429 @ Parameter (description = "The ids of the components to be deleted." )
429- @ PathVariable ("ids" ) List <String > idsToDelete
430+ @ PathVariable ("ids" ) List <String > idsToDelete ,
431+ @ Parameter (description = "Comment message" )
432+ @ RequestParam (value = "comment" , required = false ) String comment
430433 ) throws TException {
431434 User user = restControllerHelper .getSw360UserFromAuthentication ();
435+ if (StringUtils .isNotEmpty (comment )) {
436+ user .setCommentMadeDuringModerationRequest (comment );
437+ }
432438 List <MultiStatus > results = new ArrayList <>();
433439 for (String id :idsToDelete ) {
434440 RequestStatus requestStatus = componentService .deleteComponent (id , user );
You can’t perform that action at this time.
0 commit comments