Skip to content

Commit

Permalink
replace with ktor package
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin67 committed Feb 25, 2024
1 parent 2f920d7 commit 4878240
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion inngest-core/src/main/kotlin/com/inngest/Inngest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.inngest.routing
package com.inngest.ktor

import io.ktor.server.application.*
import io.ktor.server.response.*
Expand Down
4 changes: 2 additions & 2 deletions inngest-test-server/src/main/kotlin/com/inngest/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
Expand All @@ -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") {
Expand Down

0 comments on commit 4878240

Please sign in to comment.