Skip to content

Commit

Permalink
chore: changed to 404
Browse files Browse the repository at this point in the history
Co-authored-by: Andreas <[email protected]>
  • Loading branch information
jaflaten and andreasDev committed Dec 6, 2024
1 parent ec192b1 commit 89959e2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ class NasjonalOppgaveController(
fun getPapirsykmeldingManuellOppgave(
@PathVariable oppgaveId: String,
@RequestHeader("Authorization") authorization: String,
): ResponseEntity<Any> { // return type i body må være noko anna då? ?????????????????????????????????????????????????????
): ResponseEntity<Any> {
val papirManuellOppgave = nasjonalOppgaveService.getOppgave(oppgaveId, authorization)

if (papirManuellOppgave != null) {
if(papirManuellOppgave.ferdigstilt) {
log.info("Oppgave med id $oppgaveId er allerede ferdigstilt")
return ResponseEntity.status(HttpStatus.GONE).body("Oppgave med id $oppgaveId er allerede ferdigstilt")
return ResponseEntity.status(HttpStatus.NOT_FOUND).body("Oppgave med id $oppgaveId er allerede ferdigstilt")
}
return ResponseEntity.ok(nasjonalOppgaveService.mapFromDao(papirManuellOppgave))
}
Expand Down

0 comments on commit 89959e2

Please sign in to comment.