aboutsummaryrefslogtreecommitdiffstats
path: root/src/api
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2022-07-02 05:13:38 +0530
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2022-07-02 06:19:03 +0530
commitd16cc1f2c59818e53f28b4d6b4d27250331f15d7 (patch)
tree57bf4d149ec2be88dd0d351142998ce96db0d659 /src/api
parentchore: correctly export/import ui elements (diff)
downloadferdium-app-d16cc1f2c59818e53f28b4d6b4d27250331f15d7.tar.gz
ferdium-app-d16cc1f2c59818e53f28b4d6b4d27250331f15d7.tar.zst
ferdium-app-d16cc1f2c59818e53f28b4d6b4d27250331f15d7.zip
Use default exports instead of named exports
Diffstat (limited to 'src/api')
-rw-r--r--src/api/apiBase.ts4
-rw-r--r--src/api/server/ServerApi.ts2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/api/apiBase.ts b/src/api/apiBase.ts
index d7cc9b810..c6e3c0ed8 100644
--- a/src/api/apiBase.ts
+++ b/src/api/apiBase.ts
@@ -13,7 +13,7 @@ import {
13import { fixUrl } from '../helpers/url-helpers'; 13import { fixUrl } from '../helpers/url-helpers';
14 14
15// Note: This cannot be used from the internal-server since we are not running within the context of a browser window 15// Note: This cannot be used from the internal-server since we are not running within the context of a browser window
16const apiBase = (withVersion = true) => { 16export default function apiBase(withVersion = true) {
17 if ( 17 if (
18 !(window as any).ferdium || 18 !(window as any).ferdium ||
19 !(window as any).ferdium.stores.settings || 19 !(window as any).ferdium.stores.settings ||
@@ -33,8 +33,6 @@ const apiBase = (withVersion = true) => {
33 return fixUrl(withVersion ? `${url}/${API_VERSION}` : url); 33 return fixUrl(withVersion ? `${url}/${API_VERSION}` : url);
34}; 34};
35 35
36export default apiBase;
37
38export function serverBase() { 36export function serverBase() {
39 37
40 const serverType = (window as any).ferdium.stores.settings.all.app.server; 38 const serverType = (window as any).ferdium.stores.settings.all.app.server;
diff --git a/src/api/server/ServerApi.ts b/src/api/server/ServerApi.ts
index 935d7de3d..a636f3e0d 100644
--- a/src/api/server/ServerApi.ts
+++ b/src/api/server/ServerApi.ts
@@ -19,7 +19,7 @@ import RecipePreviewModel from '../../models/RecipePreview';
19import RecipeModel from '../../models/Recipe'; 19import RecipeModel from '../../models/Recipe';
20import UserModel from '../../models/User'; 20import UserModel from '../../models/User';
21 21
22import { sleep } from '../../helpers/async-helpers'; 22import sleep from '../../helpers/async-helpers';
23 23
24import { SERVER_NOT_LOADED } from '../../config'; 24import { SERVER_NOT_LOADED } from '../../config';
25import { userDataRecipesPath, userDataPath } from '../../environment-remote'; 25import { userDataRecipesPath, userDataPath } from '../../environment-remote';