From 87f4d05a4382428f483acea5096882eaca914d5a Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 2 Oct 2024 11:06:23 +0200 Subject: [PATCH] refactor(RemoveProjectAction): simplify project deletion response --- .../szut/lf8_starter/project/action/RemoveProjectAction.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/szut/lf8_starter/project/action/RemoveProjectAction.java b/src/main/java/de/szut/lf8_starter/project/action/RemoveProjectAction.java index 660856f..4d93a28 100644 --- a/src/main/java/de/szut/lf8_starter/project/action/RemoveProjectAction.java +++ b/src/main/java/de/szut/lf8_starter/project/action/RemoveProjectAction.java @@ -6,7 +6,6 @@ import de.szut.lf8_starter.project.ProjectService; import de.szut.lf8_starter.project.dto.GetProjectDto; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; import org.springframework.http.HttpStatus; @@ -39,7 +38,7 @@ public class RemoveProjectAction { return new ResponseEntity<>(HttpStatus.NOT_FOUND); } - this.projectService.delete(id); - return new ResponseEntity<>(this.projectMapper.mapToGetDto(project.get()), HttpStatus.OK); + this.projectService.delete(project.get().getId()); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); } }