refactor(RemoveProjectAction): simplify project deletion response
Some checks failed
Quality Check / Tests (pull_request) Successful in 1m1s
Quality Check / Checkstyle Main (pull_request) Successful in 46s
Build PR / Build and analyze (pull_request) Successful in 1m56s
gitea-sonarqube-bot ERROR

This commit is contained in:
Jan Gleytenhoover 2024-10-02 11:06:23 +02:00
parent 8602c6cf94
commit 87f4d05a43
Signed by: jank
GPG Key ID: B267751B8AE29EFE

@ -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);
}
}