@vertikalx/vtx-backend-client 1.0.0-prod.1 → 1.0.0-prod.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
CHANGED
package/src/api/vtx-base-api.js
CHANGED
|
@@ -7,10 +7,7 @@ const api_call_headers_1 = require("./api-call-headers");
|
|
|
7
7
|
const response_builder_1 = require("./response-builder");
|
|
8
8
|
const domains_1 = require("./domains");
|
|
9
9
|
const vtx_core_common_1 = require("@vertikalx/vtx-core-common");
|
|
10
|
-
const
|
|
11
|
-
const DEFAULT_PREPROD_URL = 'https://backend.vtxathlete.com:443';
|
|
12
|
-
const DEFAULT_DEV_REMOTE_URL = 'https://backend.vtxathlete.com:443';
|
|
13
|
-
const DEFAULT_DEV_LOCAL_URL = 'http://localhost:3010';
|
|
10
|
+
const BACKEND_URL = 'https://backend.vtxathlete.com:443';
|
|
14
11
|
class VTXBaseAPI {
|
|
15
12
|
constructor(headers, backendUrl) {
|
|
16
13
|
this.headers = headers ?? api_call_headers_1.DEFAULT_HEADERS;
|
|
@@ -23,25 +20,7 @@ class VTXBaseAPI {
|
|
|
23
20
|
this.headers[key] = value;
|
|
24
21
|
}
|
|
25
22
|
static getDefaultBackendUrl() {
|
|
26
|
-
let retValue =
|
|
27
|
-
switch (process.env?.NODE_ENV) {
|
|
28
|
-
case 'production':
|
|
29
|
-
retValue = DEFAULT_PROD_URL;
|
|
30
|
-
break;
|
|
31
|
-
case 'preprod':
|
|
32
|
-
retValue = DEFAULT_PREPROD_URL;
|
|
33
|
-
break;
|
|
34
|
-
case 'development':
|
|
35
|
-
case 'devlocal':
|
|
36
|
-
retValue = DEFAULT_DEV_LOCAL_URL;
|
|
37
|
-
break;
|
|
38
|
-
case 'devremote':
|
|
39
|
-
retValue = DEFAULT_DEV_REMOTE_URL;
|
|
40
|
-
break;
|
|
41
|
-
default:
|
|
42
|
-
retValue = DEFAULT_PROD_URL;
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
23
|
+
let retValue = BACKEND_URL;
|
|
45
24
|
return retValue;
|
|
46
25
|
}
|
|
47
26
|
static getVersion() {
|
|
@@ -5482,7 +5461,8 @@ class VTXBaseAPI {
|
|
|
5482
5461
|
position: true,
|
|
5483
5462
|
score: true,
|
|
5484
5463
|
finishTimeMS: true,
|
|
5485
|
-
resultWebLink: true
|
|
5464
|
+
resultWebLink: true,
|
|
5465
|
+
totalParticipants: true,
|
|
5486
5466
|
}
|
|
5487
5467
|
},
|
|
5488
5468
|
affiliations: {
|
|
@@ -5664,7 +5644,8 @@ class VTXBaseAPI {
|
|
|
5664
5644
|
position: true,
|
|
5665
5645
|
score: true,
|
|
5666
5646
|
finishTimeMS: true,
|
|
5667
|
-
resultWebLink: true
|
|
5647
|
+
resultWebLink: true,
|
|
5648
|
+
totalParticipants: true,
|
|
5668
5649
|
}
|
|
5669
5650
|
}
|
|
5670
5651
|
},
|
|
@@ -6789,7 +6770,8 @@ class VTXBaseAPI {
|
|
|
6789
6770
|
scores: {
|
|
6790
6771
|
vtxScore: true,
|
|
6791
6772
|
socialScore: true,
|
|
6792
|
-
trainingScore: true
|
|
6773
|
+
trainingScore: true,
|
|
6774
|
+
competitionScore: true,
|
|
6793
6775
|
}
|
|
6794
6776
|
},
|
|
6795
6777
|
});
|