Merge branch 'main' into valideringBackend

This commit is contained in:
Markus A. R. Johansen 2023-08-11 09:57:20 +02:00 committed by GitHub
commit b8b083a374
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 62 additions and 33 deletions

View file

@ -80,6 +80,12 @@ fun configureRouting(): ApplicationEngine = embeddedServer(CIO, applicationEngin
feilmeldingRepository.slettFeilmelding(id.toInt())
call.respond(status = HttpStatusCode.OK, message = "Feilmelding slettet")
}
delete("api/slettfeilmelding/{id}") {
val id = call.parameters["id"]
checkNotNull(id) {"Id kan ikke være null"}
feilmeldingRepository.slettFeilmelding(id.toInt())
call.respond(status = HttpStatusCode.Created, message = "Feilmelding slettet")
}
}
}