diff --git a/apps/tenor-search-service/src/main/java/no/nav/testnav/apps/tenorsearchservice/consumers/command/GetTenorTestdata.java b/apps/tenor-search-service/src/main/java/no/nav/testnav/apps/tenorsearchservice/consumers/command/GetTenorTestdata.java index d94e35a0bec..a2e8dbe8c55 100644 --- a/apps/tenor-search-service/src/main/java/no/nav/testnav/apps/tenorsearchservice/consumers/command/GetTenorTestdata.java +++ b/apps/tenor-search-service/src/main/java/no/nav/testnav/apps/tenorsearchservice/consumers/command/GetTenorTestdata.java @@ -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 @@ -41,7 +42,8 @@ public Mono 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 @@ -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 {