Skip to content

Commit

Permalink
CIRC-2111 Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: OleksandrVidinieiev <[email protected]>
  • Loading branch information
alexanderkurash and OleksandrVidinieiev authored Jun 21, 2024
1 parent 5a9f605 commit a280199
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ramls/circulation-settings.raml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ resourceTypes:
type: circulation-setting
responses:
204:
description: "Circulation settings have been saved."
description: "Circulation settings have been saved"
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
delete:
is: [ validate ]
is: [validate]
responses:
204:
description: "Circulation settings deleted"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public CompletableFuture<Result<CirculationSetting>> getById(String id) {
}

public CompletableFuture<Result<MultipleRecords<CirculationSetting>>> findBy(String query) {

return circulationSettingsStorageClient.getManyWithRawQueryStringParameters(query)
.thenApply(flatMapResult(response ->
MultipleRecords.from(response, CirculationSetting::from, RECORDS_PROPERTY_NAME)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void create(RoutingContext routingContext) {
final var incomingRepresentation = routingContext.body().asJsonObject();
setRandomIdIfMissing(incomingRepresentation);
final var circulationSetting = CirculationSetting.from(incomingRepresentation);
log.debug("replace:: Creating circulation setting: {}", circulationSetting);
log.debug("create:: Creating circulation setting: {}", () -> circulationSetting);

ofAsync(circulationSetting)
.thenApply(refuseWhenCirculationSettingIsInvalid())
Expand All @@ -59,7 +59,7 @@ void replace(RoutingContext routingContext) {

final var incomingRepresentation = routingContext.body().asJsonObject();
final var circulationSetting = CirculationSetting.from(incomingRepresentation);
log.debug("replace:: Replacing circulation setting : {}", circulationSetting);
log.debug("replace:: Replacing circulation setting : {}", () -> circulationSetting);

ofAsync(circulationSetting)
.thenApply(refuseWhenCirculationSettingIsInvalid())
Expand Down

0 comments on commit a280199

Please sign in to comment.