summaryrefslogtreecommitdiffstats
path: root/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'main.js')
-rw-r--r--main.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/main.js b/main.js
index a7aae91..bb4c7ab 100644
--- a/main.js
+++ b/main.js
@@ -97,10 +97,15 @@ window.onload = async() => {
const runElmApp = async() => {
try {
const user = await auth0.getUser();
+
+ const isProd = location.host.endsWith("jan.systems");
const flags = {
- email: user.email,
- name: user.name,
- pictureUrl: user.picture,
+ userData: {
+ email: user.email,
+ name: user.name,
+ pictureUrl: user.picture,
+ },
+ apiURL: isProd ? "https://bookapi.jan.systems" : "http://localhost:5678",
};
const app = Elm.Main.init({