From 42065587c010a60a03c9f164d38f44d04260e88f Mon Sep 17 00:00:00 2001 From: Markus Johansen Date: Thu, 10 Aug 2023 09:35:01 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fikset=20routing=20bug,=20Delete?= =?UTF-8?q?=20was=20not=20allowed,=20og=20feil=20endepunkt=20i=20frontend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/kotlin/no/nav/helse/sprik/plugins/Routing.kt | 1 + frontend/src/components/RedigeringsVerktoy.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 408fa8f..073dad3 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 @@ -28,6 +28,7 @@ fun configureRouting(): ApplicationEngine = embeddedServer(CIO, applicationEngin allowMethod(HttpMethod.Get) allowMethod(HttpMethod.Post) allowMethod(HttpMethod.Put) + allowMethod(HttpMethod.Delete) allowNonSimpleContentTypes = true } install(ContentNegotiation) { diff --git a/frontend/src/components/RedigeringsVerktoy.tsx b/frontend/src/components/RedigeringsVerktoy.tsx index faec604..2d42b84 100644 --- a/frontend/src/components/RedigeringsVerktoy.tsx +++ b/frontend/src/components/RedigeringsVerktoy.tsx @@ -114,7 +114,7 @@ export default RedigeringsVerktoy; const SlettFeilKnapp = (props: {id : number}) => { const SlettFeil = () => { - axios.delete(`/api/slettfeil/${props.id}`) + axios.delete(`/api/slettfeilmelding/${props.id}`) } return(