Skip to content

Commit a045f57

Browse files
Fikse sql syntax
1 parent 1ce4480 commit a045f57

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

dp-inntekt-api/src/main/kotlin/no/nav/dagpenger/inntekt/InntektApi.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ internal fun Application.inntektApi(
7676
install(StatusPages) {
7777
exception<Throwable> { call, cause ->
7878
LOGGER.error("Request failed!", cause)
79+
LOGGER.error("Request failed! Cause: ${cause.message}")
7980
val error =
8081
Problem(
8182
type = URI("urn:dp:error:inntekt"),

dp-inntekt-api/src/main/kotlin/no/nav/dagpenger/inntekt/db/PostgresInntektStore.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ internal class PostgresInntektStore(
9595

9696
override fun getInntektPersonMapping(inntektId: String): InntektPersonMapping {
9797
@Language("sql")
98-
val statement = "SELECT * FROM inntekt_V1_person_mapping WHERE inntektId = :inntektId)".trimMargin()
98+
val statement = "SELECT * FROM inntekt_V1_person_mapping WHERE inntektId = :inntektId".trimMargin()
9999

100100
return using(sessionOf(dataSource)) { session ->
101101
session.run(
@@ -105,7 +105,7 @@ internal class PostgresInntektStore(
105105
).map { row ->
106106
InntektPersonMapping(
107107
inntektId = InntektId(row.string("inntektid")),
108-
aktørId = row.string("aktorid"),
108+
aktørId = row.string("aktørid"),
109109
fnr = row.string("fnr"),
110110
kontekstId = row.string("kontekstid"),
111111
beregningsdato = row.zonedDateTime("beregningsdato").toLocalDate(),

0 commit comments

Comments
 (0)