From ebd9e0105b77bf4b36d354da76e244b79c5a4365 Mon Sep 17 00:00:00 2001 From: Sindre Kjelsrud Date: Thu, 3 Aug 2023 15:32:27 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Sender=20kommentar=20ved=20oppda?= =?UTF-8?q?tering=20av=20feil,=20fikset=20404?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Markus A. R. Johansen --- .../src/main/kotlin/no/nav/helse/sprik/plugins/Routing.kt | 5 ++--- frontend/src/components/FeilKort.tsx | 1 + frontend/src/components/RedigeringsVerktoy.tsx | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) 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' }