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:
Will Anderson
2026-05-02 11:47:23 -05:00
parent 8107c4c0e8
commit 3a18c37f7d
+4 -8
View File
@@ -1352,10 +1352,8 @@ let html_path: String = src_dir + "/index.html"
// Soul URL where the demo soul is reachable.
// Defaults to localhost for local dev; set SOUL_URL for deployed environments.
let soul_url: String = env("SOUL_URL")
if str_eq(soul_url, "") {
soul_url = "http://localhost:7772"
}
let soul_url_env: String = env("SOUL_URL")
let soul_url: String = if str_eq(soul_url_env, "") { "http://localhost:7772" } else { soul_url_env }
state_set("__soul_url__", soul_url)
// 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"
// Origin drives Stripe redirect URLs; never hardcoded to localhost.
let neuron_origin: String = env("NEURON_ORIGIN")
if str_eq(neuron_origin, "") {
neuron_origin = "https://neurontechnologies.ai"
}
let neuron_origin_env: String = env("NEURON_ORIGIN")
let neuron_origin: String = if str_eq(neuron_origin_env, "") { "https://neurontechnologies.ai" } else { neuron_origin_env }
// Founding count seeded from persist file or live Stripe query.
let sold_file: String = src_dir + "/founding_sold.txt"