@veritree/services 2.21.2-0 → 2.21.2-2
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 +7 -2
package/package.json
CHANGED
package/src/helpers/api.js
CHANGED
|
@@ -11,7 +11,11 @@ import { getSession } from './session';
|
|
|
11
11
|
function addVersionArg(url) {
|
|
12
12
|
if (!url || url.includes('_result=1')) return url;
|
|
13
13
|
|
|
14
|
-
const version
|
|
14
|
+
const version = process.env
|
|
15
|
+
? process.env.API_VERITREE_VERSION
|
|
16
|
+
? process.env.API_VERITREE_VERSION
|
|
17
|
+
: '5.0.0'
|
|
18
|
+
: '5.0.0' || '5.0.0';
|
|
15
19
|
const urlHasArgs = url.includes('?');
|
|
16
20
|
const urlVersionArg = urlHasArgs ? `&_v=${version}` : `?_v=${version}`;
|
|
17
21
|
|
|
@@ -188,6 +192,7 @@ export default class Api {
|
|
|
188
192
|
if (!isOrgLess && !isOrgAs) {
|
|
189
193
|
if (this.orgId) orgIdParam = `org_id=${this.orgId}`;
|
|
190
194
|
if (this.orgType) orgTypeParam = `&org_type=${this.orgType}`;
|
|
195
|
+
if (args && args.orgType) orgTypeParam = `&org_type=${args.orgType}`;
|
|
191
196
|
}
|
|
192
197
|
|
|
193
198
|
return `?${orgIdParam}${orgTypeParam}${createParamsStringFromArgs(args)}`;
|
|
@@ -225,4 +230,4 @@ export default class Api {
|
|
|
225
230
|
this.orgId = orgId;
|
|
226
231
|
this.orgType = orgType;
|
|
227
232
|
}
|
|
228
|
-
}
|
|
233
|
+
}
|