Skip to content

Commit

Permalink
map alt til error i dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kenglxn committed Oct 12, 2023
1 parent b2c9a52 commit 4ceedc6
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ class VarslingStatusController(
varslingStatus
},
other = {
when(varslingStatus.status) {
Status.OK -> varslingStatus
else -> varslingStatus.copy(status = Status.MANGLER_KOFUVI)
}
varslingStatus.copy(status = Status.MANGLER_KOFUVI)
},
)

Expand All @@ -41,11 +38,11 @@ class VarslingStatusController(
.any { it.organizationNumber == virksomhetsnummer }

if (!harTilgang) {
return VarslingStatus(
return mapStatus(VarslingStatus(
status = Status.OK,
varselTimestamp = LocalDateTime.now(),
kvittertEventTimestamp = Instant.now(),
)
))
}

return mapStatus(repository.varslingStatus(virksomhetsnummer = virksomhetsnummer))
Expand Down

0 comments on commit 4ceedc6

Please sign in to comment.