fix: shadow-let soul_url and neuron_origin so the default actually stores
The native elc silently drops bare reassignment inside an if body (`name = expr` compiles to an orphan expr statement with no store). Both soul_url and neuron_origin defaulted to empty, breaking every http_post call to the in-container soul-demo. Switch to let-shadowed if-expressions until the compiler is fixed. See: products/web/src/main.el `/api/soul-health` route output.
This commit is contained in:
+4
-8
@@ -1352,10 +1352,8 @@ let html_path: String = src_dir + "/index.html"
|
|||||||
|
|
||||||
// Soul URL — where the demo soul is reachable.
|
// Soul URL — where the demo soul is reachable.
|
||||||
// Defaults to localhost for local dev; set SOUL_URL for deployed environments.
|
// Defaults to localhost for local dev; set SOUL_URL for deployed environments.
|
||||||
let soul_url: String = env("SOUL_URL")
|
let soul_url_env: String = env("SOUL_URL")
|
||||||
if str_eq(soul_url, "") {
|
let soul_url: String = if str_eq(soul_url_env, "") { "http://localhost:7772" } else { soul_url_env }
|
||||||
soul_url = "http://localhost:7772"
|
|
||||||
}
|
|
||||||
state_set("__soul_url__", soul_url)
|
state_set("__soul_url__", soul_url)
|
||||||
|
|
||||||
// Stripe config from environment — loaded first so founding count can use it.
|
// Stripe config from environment — loaded first so founding count can use it.
|
||||||
@@ -1371,10 +1369,8 @@ let supabase_service_key: String = env("SUPABASE_SERVICE_KEY")
|
|||||||
let supabase_project_url: String = "https://ocojsghaonltunidkzpw.supabase.co"
|
let supabase_project_url: String = "https://ocojsghaonltunidkzpw.supabase.co"
|
||||||
|
|
||||||
// Origin — drives Stripe redirect URLs; never hardcoded to localhost.
|
// Origin — drives Stripe redirect URLs; never hardcoded to localhost.
|
||||||
let neuron_origin: String = env("NEURON_ORIGIN")
|
let neuron_origin_env: String = env("NEURON_ORIGIN")
|
||||||
if str_eq(neuron_origin, "") {
|
let neuron_origin: String = if str_eq(neuron_origin_env, "") { "https://neurontechnologies.ai" } else { neuron_origin_env }
|
||||||
neuron_origin = "https://neurontechnologies.ai"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Founding count — seeded from persist file or live Stripe query.
|
// Founding count — seeded from persist file or live Stripe query.
|
||||||
let sold_file: String = src_dir + "/founding_sold.txt"
|
let sold_file: String = src_dir + "/founding_sold.txt"
|
||||||
|
|||||||
Reference in New Issue
Block a user