Skip to content

Commit

Permalink
Demand er nok det jeg lette etter i går 🧠
Browse files Browse the repository at this point in the history
  • Loading branch information
fraadsbrandth committed Feb 7, 2024
1 parent 4a8955b commit 4e8d834
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal class HendelseRiver(
validate {
it.demandValue("@event_name", eventName)
it.require("@opprettet", JsonNode::asLocalDateTime)
it.require("@id") { generasjonId -> UUID.fromString(generasjonId.asText()) }
it.require("@id") { id -> UUID.fromString(id.asText()) }
valider(it)
}
}.register(this)
Expand All @@ -40,7 +40,7 @@ internal class HendelseRiver(
?.let { keyValue(key.removePrefix("@"), it.asText()) } }

override fun onError(problems: MessageProblems, context: MessageContext) {
//sikkerLogg.error("Forsto ikke $eventName:\n\t${problems.toExtendedReport()}")
sikkerLogg.error("Forsto ikke $eventName:\n\t${problems.toExtendedReport()}")
}

internal companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ internal class VedtaksperiodeEndret(
rapidsConnection = rapidsConnection,
behandlingDao = behandlingDao,
valider = { packet ->
packet.require("gjeldendeTilstand") { check(it.asText().startsWith("AVVENTER_GODKJENNING")) }
packet.demand("gjeldendeTilstand") { check(it.asText().startsWith("AVVENTER_GODKJENNING")) }
packet.requireVedtaksperiodeId()
},
opprett = { packet -> VedtaksperiodeEndret(
Expand Down

0 comments on commit 4e8d834

Please sign in to comment.