Skip to content

Commit

Permalink
oppdater arrow-kt -> 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
klechr committed Feb 14, 2025
1 parent 6b65a93 commit 8a5a74c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ dependencies {
implementation("com.github.guepardoapps:kulid:2.0.0.0")

// Funksjonelle operatorer
implementation("io.arrow-kt:arrow-core:1.2.4")
implementation("io.arrow-kt:arrow-core:2.0.1")

// audit log
implementation("com.papertrailapp:logback-syslog4j:1.0.0")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package no.nav.lydia.virksomhet.api

import arrow.core.left
import arrow.core.right
import arrow.core.rightIfNotNull
import io.ktor.http.HttpStatusCode
import io.ktor.server.application.call
import io.ktor.server.application.log
import io.ktor.server.response.respond
import io.ktor.server.routing.Route
Expand Down Expand Up @@ -32,7 +31,7 @@ fun Route.virksomhet(
call.parameters["orgnummer"] ?: return@get call.respond(SykefraværsstatistikkError.`ugyldig orgnummer`)
call.somLesebruker(adGrupper = adGrupper) { _ ->
virksomhetService.hentVirksomhet(orgnr = orgnummer)?.toDto()
.rightIfNotNull { VirksomhetFeil.`fant ikke virksomhet` }
?.right() ?: VirksomhetFeil.`fant ikke virksomhet`.left()
}.also {
auditLog.auditloggEither(call = call, either = it, orgnummer = orgnummer, auditType = AuditType.access)
}.map {
Expand Down

0 comments on commit 8a5a74c

Please sign in to comment.