From 56be711ee89a86c7ba7c01a361163823b1056e16 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Thu, 4 Nov 2021 15:06:51 +0200 Subject: Prepare for release --- main.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'main.js') 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({ -- cgit v1.3