refactor(HelloController): remove unused methods and comments
This commit is contained in:
parent
21dd134dd6
commit
981f63b247
@ -45,22 +45,6 @@ public class HelloController {
|
|||||||
return this.helloMapper.mapToGetDto(helloEntity);
|
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")
|
@Operation(summary = "deletes a Hello by id")
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(responseCode = "204", description = "delete successful"),
|
@ApiResponse(responseCode = "204", description = "delete successful"),
|
||||||
@ -78,22 +62,4 @@ public class HelloController {
|
|||||||
this.service.delete(entity);
|
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