Skip to content

Commit 8b81c72

Browse files
committed
feat: provide form schemas router as extension property to Api
1 parent 8996813 commit 8b81c72

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.ctrlhub.core.datacapture
22

3+
import com.ctrlhub.core.Api
34
import com.ctrlhub.core.api.response.PaginatedList
45
import com.ctrlhub.core.datacapture.response.FormSchema
56
import com.ctrlhub.core.extractPaginationFromMeta
@@ -67,4 +68,7 @@ class FormSchemasRouter(httpClient: HttpClient) : Router(httpClient) {
6768
}
6869

6970
private fun JsonElement.jsonObjectOrNull(): JsonObject? = this as? JsonObject
70-
}
71+
}
72+
73+
val Api.formSchemas: FormSchemasRouter
74+
get() = FormSchemasRouter(httpClient)

0 commit comments

Comments
 (0)