diff --git a/inngest-core/src/main/kotlin/com/inngest/Inngest.kt b/inngest-core/src/main/kotlin/com/inngest/Inngest.kt index 5256ef6c..f2be13a3 100644 --- a/inngest-core/src/main/kotlin/com/inngest/Inngest.kt +++ b/inngest-core/src/main/kotlin/com/inngest/Inngest.kt @@ -3,9 +3,12 @@ package com.inngest // import okhttp3.RequestBody.Companion.toRequestBody class Inngest { + val appId: String, + constructor( - app_id: String, + appId: String, ) { + this.appId = appId // TODO - Fetch INNGEST_EVENT_KEY env variable } diff --git a/inngest-core/src/main/kotlin/com/inngest/routing/Ktor.kt b/inngest-core/src/main/kotlin/com/inngest/ktor/Route.kt similarity index 93% rename from inngest-core/src/main/kotlin/com/inngest/routing/Ktor.kt rename to inngest-core/src/main/kotlin/com/inngest/ktor/Route.kt index ce2c12de..abdffde7 100644 --- a/inngest-core/src/main/kotlin/com/inngest/routing/Ktor.kt +++ b/inngest-core/src/main/kotlin/com/inngest/ktor/Route.kt @@ -1,4 +1,4 @@ -package com.inngest.routing +package com.inngest.ktor import io.ktor.server.application.* import io.ktor.server.response.* diff --git a/inngest-test-server/src/main/kotlin/com/inngest/App.kt b/inngest-test-server/src/main/kotlin/com/inngest/App.kt index 90d8481e..a9620097 100644 --- a/inngest-test-server/src/main/kotlin/com/inngest/App.kt +++ b/inngest-test-server/src/main/kotlin/com/inngest/App.kt @@ -7,7 +7,7 @@ import com.inngest.FunctionTrigger import com.inngest.Inngest import com.inngest.InngestEvent import com.inngest.InngestFunction -import com.inngest.routing.inngestRoutes +import com.inngest.ktor.* import io.ktor.http.* import io.ktor.server.application.* import io.ktor.server.engine.* @@ -20,7 +20,7 @@ import java.time.Duration data class IngestData(val message: String) fun Application.module() { - var inngest = Inngest(app_id = "ktor-dev") + var inngest = Inngest(appId = "ktor-dev") routing { post("/api/inngest") {