diff --git a/proxy/src/main/java/no/nav/modiapersonoversiktproxy/rest/Utils.kt b/proxy/src/main/java/no/nav/modiapersonoversiktproxy/rest/Utils.kt index 509f7ad3c6..ea01206eef 100644 --- a/proxy/src/main/java/no/nav/modiapersonoversiktproxy/rest/Utils.kt +++ b/proxy/src/main/java/no/nav/modiapersonoversiktproxy/rest/Utils.kt @@ -3,7 +3,6 @@ package no.nav.modiapersonoversiktproxy.rest import kotlinx.serialization.Serializable import org.joda.time.format.DateTimeFormat import java.time.format.DateTimeFormatter -import java.time.format.DateTimeFormatterBuilder @Serializable data class RequestBodyContent( @@ -14,10 +13,3 @@ data class RequestBodyContent( val JODA_DATOFORMAT: org.joda.time.format.DateTimeFormatter = DateTimeFormat.forPattern("yyyy-MM-dd") val DATOFORMAT: DateTimeFormatter = DateTimeFormatter.ISO_LOCAL_DATE -val DATO_TID_FORMAT: DateTimeFormatter = - DateTimeFormatterBuilder() - .append(DateTimeFormatter.ISO_LOCAL_DATE) - .appendLiteral("T") - .appendPattern("HH:mm:ss") - .appendOffsetId() - .toFormatter() diff --git a/web/src/main/java/no/nav/modiapersonoversikt/consumer/arenainfotrygdproxy/ArenaInfotrygdApi.kt b/web/src/main/java/no/nav/modiapersonoversikt/consumer/arenainfotrygdproxy/ArenaInfotrygdApi.kt index 7c878d923b..2001d1225b 100644 --- a/web/src/main/java/no/nav/modiapersonoversikt/consumer/arenainfotrygdproxy/ArenaInfotrygdApi.kt +++ b/web/src/main/java/no/nav/modiapersonoversikt/consumer/arenainfotrygdproxy/ArenaInfotrygdApi.kt @@ -29,20 +29,20 @@ interface ArenaInfotrygdApi { fun hentSykepenger( fnr: String, - fom: String, - tom: String, + fom: String?, + tom: String?, ): Map fun hentForeldrepenger( fnr: String, - fom: String, - tom: String, + fom: String?, + tom: String?, ): Map fun hentPleiepenger( fnr: String, - fom: String, - tom: String, + fom: String?, + tom: String?, ): Map fun hentOppfolgingssakFraArena(fnr: String): JournalforingSak? @@ -87,8 +87,8 @@ open class ArenaInfotrygdApiImpl( @Cacheable(value = ["sykePengerCache"]) override fun hentSykepenger( fnr: String, - fom: String, - tom: String, + fom: String?, + tom: String?, ): Map { val requestContent = Json.encodeToString(RequestBodyContent(fnr, fom, tom)) return sendRequest("sykepenger", requestContent) ?: mapOf() @@ -97,8 +97,8 @@ open class ArenaInfotrygdApiImpl( @Cacheable(value = ["foreldrePengerCache"]) override fun hentForeldrepenger( fnr: String, - fom: String, - tom: String, + fom: String?, + tom: String?, ): Map { val requestContent = Json.encodeToString(RequestBodyContent(fnr, fom, tom)) return sendRequest("foreldrepenger", requestContent) ?: mapOf() @@ -107,8 +107,8 @@ open class ArenaInfotrygdApiImpl( @Cacheable(value = ["pleiePengerCache"]) override fun hentPleiepenger( fnr: String, - fom: String, - tom: String, + fom: String?, + tom: String?, ): Map { val requestContent = Json.encodeToString(RequestBodyContent(fnr, fom, tom)) return sendRequest("pleiepenger", requestContent) ?: mapOf() diff --git a/web/src/main/java/no/nav/modiapersonoversikt/consumer/tiltakspenger/TiltakspengerService.kt b/web/src/main/java/no/nav/modiapersonoversikt/consumer/tiltakspenger/TiltakspengerService.kt index 76d1bbf8af..54be19c76d 100644 --- a/web/src/main/java/no/nav/modiapersonoversikt/consumer/tiltakspenger/TiltakspengerService.kt +++ b/web/src/main/java/no/nav/modiapersonoversikt/consumer/tiltakspenger/TiltakspengerService.kt @@ -14,8 +14,8 @@ import org.springframework.cache.annotation.Cacheable interface TiltakspengerService { fun hentVedtakDetaljer( fodselsnummer: Fnr, - fom: String, - tom: String, + fom: String?, + tom: String?, ): List } @@ -27,8 +27,8 @@ open class TiltakspengerServiceImpl( @Cacheable override fun hentVedtakDetaljer( fodselsnummer: Fnr, - fom: String, - tom: String, + fom: String?, + tom: String?, ): List = tiltakspengerApi.vedtakDetaljerPost(vedtakReqDTO = VedtakReqDTO(ident = fodselsnummer.get(), fom, tom)).orEmpty() override fun ping() = diff --git a/web/src/main/java/no/nav/modiapersonoversikt/rest/Utils.kt b/web/src/main/java/no/nav/modiapersonoversikt/rest/Utils.kt index 9babc4982b..d33bd4f05c 100644 --- a/web/src/main/java/no/nav/modiapersonoversikt/rest/Utils.kt +++ b/web/src/main/java/no/nav/modiapersonoversikt/rest/Utils.kt @@ -1,15 +1,5 @@ package no.nav.modiapersonoversikt.rest import org.joda.time.format.DateTimeFormat -import java.time.format.DateTimeFormatter -import java.time.format.DateTimeFormatterBuilder val JODA_DATOFORMAT: org.joda.time.format.DateTimeFormatter = DateTimeFormat.forPattern("yyyy-MM-dd") -val DATOFORMAT: DateTimeFormatter = DateTimeFormatter.ISO_LOCAL_DATE -val DATO_TID_FORMAT: DateTimeFormatter = - DateTimeFormatterBuilder() - .append(DateTimeFormatter.ISO_LOCAL_DATE) - .appendLiteral("T") - .appendPattern("HH:mm:ss") - .appendOffsetId() - .toFormatter() diff --git a/web/src/main/java/no/nav/modiapersonoversikt/rest/common/FnrRequest.kt b/web/src/main/java/no/nav/modiapersonoversikt/rest/common/FnrRequest.kt index 70ceac3a0d..025a78de3c 100644 --- a/web/src/main/java/no/nav/modiapersonoversikt/rest/common/FnrRequest.kt +++ b/web/src/main/java/no/nav/modiapersonoversikt/rest/common/FnrRequest.kt @@ -6,6 +6,6 @@ data class FnrRequest( data class FnrDatoRangeRequest( val fnr: String, - val fom: String, - val tom: String, + val fom: String? = null, + val tom: String? = null, )