@veritree/services 2.26.3 → 2.26.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/helpers/api.js +22 -22
package/package.json
CHANGED
package/src/helpers/api.js
CHANGED
|
@@ -11,27 +11,27 @@ import { getSession } from "./session";
|
|
|
11
11
|
*
|
|
12
12
|
* @returns {Object|null} - The runtime configuration object, or null if it's not available.
|
|
13
13
|
*/
|
|
14
|
-
function getNuxtRuntimeConfig() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function getVersion() {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
14
|
+
// function getNuxtRuntimeConfig() {
|
|
15
|
+
// if (typeof useRuntimeConfig === "function") {
|
|
16
|
+
// return useRuntimeConfig();
|
|
17
|
+
// } else {
|
|
18
|
+
// return null;
|
|
19
|
+
// }
|
|
20
|
+
// }
|
|
21
|
+
|
|
22
|
+
// function getVersion() {
|
|
23
|
+
// if (process) {
|
|
24
|
+
// process?.env?.API_VERITREE_VERSION;
|
|
25
|
+
// } else {
|
|
26
|
+
// const nuxtRuntimeConfig = getNuxtRuntimeConfig();
|
|
27
|
+
|
|
28
|
+
// if (nuxtRuntimeConfig) {
|
|
29
|
+
// return nuxtRuntimeConfig.public.API_VERITREE_VERSION;
|
|
30
|
+
// }
|
|
31
|
+
// }
|
|
32
|
+
|
|
33
|
+
// return "5.0.0";
|
|
34
|
+
// }
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Adds a version parameter to a URL if it does not already have one.
|
|
@@ -53,7 +53,7 @@ function addVersionParam(url) {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
// Use environment variable if available, otherwise use default version
|
|
56
|
-
const version =
|
|
56
|
+
const version = process.env.API_VERITREE_VERSION || "5.0.0";
|
|
57
57
|
|
|
58
58
|
// Append version parameter to URL
|
|
59
59
|
const urlVersionParam = url.includes("?")
|