Skip to content

Commit

Permalink
Replace public url
Browse files Browse the repository at this point in the history
  • Loading branch information
gchristov committed Aug 13, 2023
1 parent f02c326 commit 8fbf7ba
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
16 changes: 0 additions & 16 deletions backend/common-service/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import com.gchristov.thecodinglove.gradleplugins.getLocalSecret

val packageId = "com.gchristov.thecodinglove.commonservice"

plugins {
id("kmp-module-plugin")
id("build-config-plugin")
}

kotlin {
Expand All @@ -15,15 +10,4 @@ kotlin {
}
}
}
}

buildkonfig {
packageName = packageId
defaultConfigs {
buildConfigField(
type = com.codingfeline.buildkonfig.compiler.FieldSpec.Type.STRING,
name = "APP_PUBLIC_URL",
value = getLocalSecret(rootProject, "APP_PUBLIC_URL")
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,5 @@ object CommonServiceModule : DiModule() {
): PubSubSubscription = GoogleCloudPubSubSubscription(
log = log,
pubSub = pubSub,
pubSubDomain = BuildKonfig.APP_PUBLIC_URL,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import kotlin.js.json
internal class GoogleCloudPubSubSubscription(
private val log: Logger,
private val pubSub: GoogleCloudPubSubExternals.PubSub,
private val pubSubDomain: String,
) : PubSubSubscription {
init {
process.env.GOOGLE_APPLICATION_CREDENTIALS = "local-credentials-pubsub.json"
Expand All @@ -31,7 +30,7 @@ internal class GoogleCloudPubSubSubscription(
log.d("Creating PubSub subscription $subscription")
pubSubSubscription.create(
// TODO: Fix this to use a env variable for the website
json("pushEndpoint" to "$pubSubDomain/$httpPath")
json("pushEndpoint" to "https://cloudrun-test-oe6rkpnjrq-uw.a.run.app/$httpPath")
).await()
}
Either.Right(Unit)
Expand Down

0 comments on commit 8fbf7ba

Please sign in to comment.