diff --git a/backend/src/main/kotlin/no/nav/helse/sprik/plugins/Routing.kt b/backend/src/main/kotlin/no/nav/helse/sprik/plugins/Routing.kt index 2aa6077..f6870e2 100644 --- a/backend/src/main/kotlin/no/nav/helse/sprik/plugins/Routing.kt +++ b/backend/src/main/kotlin/no/nav/helse/sprik/plugins/Routing.kt @@ -68,6 +68,7 @@ fun configureRouting(): ApplicationEngine = embeddedServer(CIO, applicationEngin } put("/api/oppdaterfeil") { val oppdatertFeilmelding = call.receive() + println(oppdatertFeilmelding) feilmeldingRepository.oppdaterFeilmelding(oppdatertFeilmelding) call.respond(status = HttpStatusCode.Created, message = "Feilmelding oppdatert") } @@ -82,6 +83,4 @@ fun configureRouting(): ApplicationEngine = embeddedServer(CIO, applicationEngin connector { port = 8080 } -}) - - +}) \ No newline at end of file diff --git a/frontend/src/components/FeilKort.tsx b/frontend/src/components/FeilKort.tsx index b41f587..01d45b9 100644 --- a/frontend/src/components/FeilKort.tsx +++ b/frontend/src/components/FeilKort.tsx @@ -62,6 +62,7 @@ const FeilKort = (props: IFeilKort) => { setRedigeringsmodus={setRedigeringsmodus} setVisModal={setVisModal} reset={props.reset} + kommentar={props.kommentar} /> : { dato: props.dato.toISOString().replace('Z', ''), arbeidsstatus: arbeidsstatus, haster: haster, + kommentar: props.kommentar } - await axios.put(`/api/oppdaterfeil/`, payload, { + await axios.put(`/api/oppdaterfeil`, payload, { headers: { 'Content-Type': 'application/json' }