PMT-15: Projekte löschen #11

Merged
SZUT-Ole merged 3 commits from story/PMT-15-projekte-loeschen into trunk 2024-10-09 13:14:40 +00:00
Showing only changes of commit 165aee2ece - Show all commits

View file

@ -35,6 +35,16 @@ public class ApiController implements DefaultApi {
return Optional.empty();
}
@Override
public ResponseEntity<Void> deleteProject(Long id) {
if (!projectRepository.existsById(id)) {
return ResponseEntity.notFound().build();
}
projectRepository.deleteById(id);
return ResponseEntity.noContent().build();
}
@Override
public ResponseEntity<GetAllProjectsDTO> getAllProjects() {
GetAllProjectsDTO response = new GetAllProjectsDTO();