@veritree/services 2.26.4 → 2.26.5
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 +9 -6
package/package.json
CHANGED
package/src/helpers/api.js
CHANGED
|
@@ -105,13 +105,16 @@ function getConfig(method, data, as) {
|
|
|
105
105
|
|
|
106
106
|
export default class Api {
|
|
107
107
|
constructor(resource) {
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
// Nuxt 3
|
|
109
|
+
// const nuxtConfig = getNuxtRuntimeConfig();
|
|
110
|
+
// const url =
|
|
111
|
+
// nuxtConfig?.public?.API_VERITREE_URL ||
|
|
112
|
+
// process?.env?.API_VERITREE_URL ||
|
|
113
|
+
// null;
|
|
113
114
|
|
|
114
|
-
this.baseUrl = url + "/api";
|
|
115
|
+
// this.baseUrl = url + "/api";
|
|
116
|
+
|
|
117
|
+
this.baseUrl = process.env ? `${process.env.API_VERITREE_URL}/api` : null;
|
|
115
118
|
this.resource = resource ? resource : "";
|
|
116
119
|
this.orgId = null;
|
|
117
120
|
this.orgType = null;
|