diff options
author | Aditya Mangalampalli <aditya.mangalampalli@gmail.com> | 2022-04-15 02:00:25 -0700 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2022-04-16 21:57:57 +0530 |
commit | 210131ca184c3aa043371857c022aa1aa149efbf (patch) | |
tree | 6bc4e10a1540e55a66146c099bc468a12287425e /src/api/apiBase.ts | |
parent | Update submodule url to ferdium-recipes (#1) (diff) | |
download | ferdium-app-210131ca184c3aa043371857c022aa1aa149efbf.tar.gz ferdium-app-210131ca184c3aa043371857c022aa1aa149efbf.tar.zst ferdium-app-210131ca184c3aa043371857c022aa1aa149efbf.zip |
Matched casing for almost all replacements
Diffstat (limited to 'src/api/apiBase.ts')
-rw-r--r-- | src/api/apiBase.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/api/apiBase.ts b/src/api/apiBase.ts index a30793848..c41fbe8ba 100644 --- a/src/api/apiBase.ts +++ b/src/api/apiBase.ts | |||
@@ -13,20 +13,20 @@ import { | |||
13 | // Note: This cannot be used from the internal-server since we are not running within the context of a browser window | 13 | // Note: This cannot be used from the internal-server since we are not running within the context of a browser window |
14 | const apiBase = (withVersion = true) => { | 14 | const apiBase = (withVersion = true) => { |
15 | if ( | 15 | if ( |
16 | !(window as any).ferdi || | 16 | !(window as any).ferdium || |
17 | !(window as any).ferdi.stores.settings || | 17 | !(window as any).ferdium.stores.settings || |
18 | !(window as any).ferdi.stores.settings.all || | 18 | !(window as any).ferdium.stores.settings.all || |
19 | !(window as any).ferdi.stores.settings.all.app.server | 19 | !(window as any).ferdium.stores.settings.all.app.server |
20 | ) { | 20 | ) { |
21 | // Stores have not yet been loaded - return SERVER_NOT_LOADED to force a retry when stores are loaded | 21 | // Stores have not yet been loaded - return SERVER_NOT_LOADED to force a retry when stores are loaded |
22 | return SERVER_NOT_LOADED; | 22 | return SERVER_NOT_LOADED; |
23 | } | 23 | } |
24 | const url = | 24 | const url = |
25 | (window as any).ferdi.stores.settings.all.app.server === LOCAL_SERVER | 25 | (window as any).ferdium.stores.settings.all.app.server === LOCAL_SERVER |
26 | ? `http://${LOCAL_HOSTNAME}:${ | 26 | ? `http://${LOCAL_HOSTNAME}:${ |
27 | (window as any).ferdi.stores.requests.localServerPort | 27 | (window as any).ferdium.stores.requests.localServerPort |
28 | }` | 28 | }` |
29 | : (window as any).ferdi.stores.settings.all.app.server; | 29 | : (window as any).ferdium.stores.settings.all.app.server; |
30 | 30 | ||
31 | return withVersion ? `${url}/${API_VERSION}` : url; | 31 | return withVersion ? `${url}/${API_VERSION}` : url; |
32 | }; | 32 | }; |
@@ -34,8 +34,8 @@ const apiBase = (withVersion = true) => { | |||
34 | export default apiBase; | 34 | export default apiBase; |
35 | 35 | ||
36 | export function termsBase() { | 36 | export function termsBase() { |
37 | // TODO: This needs to handle local vs ferdi vs franz servers | 37 | // TODO: This needs to handle local vs ferdium vs franz servers |
38 | return (window as any).ferdi.stores.settings.all.app.server !== LIVE_FRANZ_API | 38 | return (window as any).ferdium.stores.settings.all.app.server !== LIVE_FRANZ_API |
39 | ? (window as any).ferdi.stores.settings.all.app.server | 39 | ? (window as any).ferdium.stores.settings.all.app.server |
40 | : DEV_API_FRANZ_WEBSITE; | 40 | : DEV_API_FRANZ_WEBSITE; |
41 | } | 41 | } |