Skip to content

Commit

Permalink
feat(backend): ignore unknown keys in json as input.
Browse files Browse the repository at this point in the history
  • Loading branch information
GerardPaligot committed Feb 20, 2024
1 parent 99bb766 commit af67ed3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/src/main/java/org/gdglille/devfest/backend/Server.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import io.ktor.server.request.receive
import io.ktor.server.response.respond
import io.ktor.server.routing.route
import io.ktor.server.routing.routing
import kotlinx.serialization.json.Json
import org.gdglille.devfest.backend.categories.CategoryDao
import org.gdglille.devfest.backend.categories.registerCategoriesRoutes
import org.gdglille.devfest.backend.events.EventDao
Expand Down Expand Up @@ -121,7 +122,9 @@ fun main() {
anyHost()
}
install(ContentNegotiation) {
json()
json(
Json { ignoreUnknownKeys = true }
)
}
install(ConditionalHeaders)
install(StatusPages) {
Expand Down

0 comments on commit af67ed3

Please sign in to comment.