From 3336789ba527e0421d0718834afdffd0f85c3b10 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Thu, 5 Aug 2021 08:45:37 +0530 Subject: refactor: minor refactoring: solve name-clash of env vars vs vars in the program --- src/api/apiBase.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/api') diff --git a/src/api/apiBase.js b/src/api/apiBase.js index 842c85e56..3278dc454 100644 --- a/src/api/apiBase.js +++ b/src/api/apiBase.js @@ -5,6 +5,8 @@ import { API_VERSION, } from '../environment'; import { + DEV_API_FRANZ_WEBSITE, + LIVE_FRANZ_API, LOCAL_SERVER, SERVER_NOT_LOADED, } from '../config'; @@ -34,3 +36,8 @@ const apiBase = (withVersion = true) => { }; export default apiBase; + +export function termsBase() { + // TODO: This needs to handle local vs ferdi vs franz servers + return window.ferdi.stores.settings.all.app.server !== LIVE_FRANZ_API ? window.ferdi.stores.settings.all.app.server : DEV_API_FRANZ_WEBSITE; +} -- cgit v1.2.3-54-g00ecf