Skip to content

Commit

Permalink
Feilretting #deploy-tenor-search-service
Browse files Browse the repository at this point in the history
  • Loading branch information
krharum committed Jan 23, 2024
1 parent cd7fd4c commit f840cdd
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
import static org.apache.logging.log4j.util.Strings.isNotBlank;

@Slf4j
@RequiredArgsConstructor
Expand All @@ -41,7 +42,8 @@ public Mono<TenorResponse> call() {
log.info("Query-parameter: {}", query);
var requestParams = Map.of(
"kilde", getKilde(kilde).getKilde(),
"query", query);
"query", query,
"alle", "*");

return webClient.get()
.uri(uriBuilder -> uriBuilder
Expand Down Expand Up @@ -72,8 +74,8 @@ private String getVisning(InfoType type) {
if (nonNull(type)) {
return switch (type) {
case Kildedata -> "tenorMetadata.kildedata";
case AlleFelter -> "*";
case Spesifikt -> fields;
case AlleFelter -> "{alle}";
case Spesifikt -> isNotBlank(fields) ? fields : "id";
default -> null;
};
} else {
Expand Down

0 comments on commit f840cdd

Please sign in to comment.