refactor: Fix yellow code smells #27
@ -45,22 +45,6 @@ public class HelloController {
|
||||
return this.helloMapper.mapToGetDto(helloEntity);
|
||||
}
|
||||
|
||||
@Operation(summary = "delivers a list of hellos")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "list of hellos",
|
||||
content = {@Content(mediaType = "application/json",
|
||||
schema = @Schema(implementation = HelloGetDto.class))}),
|
||||
@ApiResponse(responseCode = "401", description = "not authorized",
|
||||
content = @Content)})
|
||||
@GetMapping
|
||||
public List<HelloGetDto> findAll() {
|
||||
return this.service
|
||||
.readAll()
|
||||
.stream()
|
||||
.map(e -> this.helloMapper.mapToGetDto(e))
|
||||
.toList();
|
||||
}
|
||||
|
||||
@Operation(summary = "deletes a Hello by id")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "204", description = "delete successful"),
|
||||
@ -78,22 +62,4 @@ public class HelloController {
|
||||
this.service.delete(entity);
|
||||
}
|
||||
}
|
||||
|
||||
@Operation(summary = "find hellos by message")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "List of hellos who have the given message",
|
||||
content = {@Content(mediaType = "application/json",
|
||||
schema = @Schema(implementation = HelloGetDto.class))}),
|
||||
@ApiResponse(responseCode = "404", description = "qualification description does not exist",
|
||||
content = @Content),
|
||||
@ApiResponse(responseCode = "401", description = "not authorized",
|
||||
content = @Content)})
|
||||
@GetMapping("/findByMessage")
|
||||
public List<HelloGetDto> findAllEmployeesByQualification(@RequestParam String message) {
|
||||
return this.service
|
||||
.findByMessage(message)
|
||||
.stream()
|
||||
.map(e -> this.helloMapper.mapToGetDto(e))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user