Skip to content

Commit cbdccbb

Browse files
committed
fix: correct how form schema object is instantiated from JSON
1 parent b4fa5f2 commit cbdccbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/com/ctrlhub/core/datacapture/FormSchemasRouter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class FormSchemasRouter(httpClient: HttpClient) : Router(httpClient) {
5353
}
5454

5555
private fun instantiateFormSchemaFromJson(json: JsonObject): FormSchema {
56-
val id = json["id"]?.jsonPrimitive?.content
56+
val id = json["data"]?.jsonObject["id"]?.jsonPrimitive?.content
5757
?: throw IllegalStateException("Missing id")
5858

5959
val rawContent = json.toString()

0 commit comments

Comments
 (0)