Skip to content

Commit

Permalink
Tester noe greier 2
Browse files Browse the repository at this point in the history
  • Loading branch information
AudunSorheim committed Jan 30, 2024
1 parent b25905c commit f8c98fc
Showing 1 changed file with 6 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,9 @@ class NarmesteLederController @Autowired constructor(
narmesteLederIdent = innloggetIdent,
virksomhetsnummer = virksomhetsnummer
)
if (narmesteLedere != null) {
return ResponseEntity
.status(HttpStatus.OK)
.body(narmesteLedere.mapToNarmesteLeder())
} else {
return ResponseEntity
.status(HttpStatus.NO_CONTENT)
.build()
}
return ResponseEntity
.status(HttpStatus.NO_CONTENT)
.build()
}
}
}
Expand All @@ -87,15 +81,9 @@ class NarmesteLederController @Autowired constructor(

val narmesteLedere = narmesteLederClient.alleAktiveLedereForSykmeldt(ansattFnr = innloggetIdent)

return if (narmesteLedere.isNotEmpty()) {
ResponseEntity
.status(HttpStatus.OK)
.body(narmesteLedere.map { it.mapToNarmesteLeder() })
} else {
ResponseEntity
.status(HttpStatus.NO_CONTENT)
.build()
}
return ResponseEntity
.status(HttpStatus.NO_CONTENT)
.build()
}

companion object {
Expand Down

0 comments on commit f8c98fc

Please sign in to comment.