We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbdccbb commit 82ed9cbCopy full SHA for 82ed9cb
src/main/kotlin/com/ctrlhub/core/datacapture/FormSchemasRouter.kt
@@ -49,11 +49,11 @@ class FormSchemasRouter(httpClient: HttpClient) : Router(httpClient) {
49
val jsonContent = Json.parseToJsonElement(response.body<String>()).jsonObjectOrNull()
50
?: throw IllegalStateException("Missing JSON content")
51
52
- return instantiateFormSchemaFromJson(jsonContent)
+ return instantiateFormSchemaFromJson(jsonContent["data"]!!.jsonObject)
53
}
54
55
private fun instantiateFormSchemaFromJson(json: JsonObject): FormSchema {
56
- val id = json["data"]?.jsonObject["id"]?.jsonPrimitive?.content
+ val id = json["id"]?.jsonPrimitive?.content
57
?: throw IllegalStateException("Missing id")
58
59
val rawContent = json.toString()
0 commit comments