@varsityvibe/api-client
Advanced tools
+1
-1
| { | ||
| "name": "@varsityvibe/api-client", | ||
| "description": "API client for the Varsity Vibe web and mobile apps", | ||
| "version": "1.3.31", | ||
| "version": "1.3.32", | ||
| "author": "Tiaan du Plessis <tiaanduplessis@hotmail.com>", | ||
@@ -6,0 +6,0 @@ "type": "module", |
@@ -14,3 +14,3 @@ import client from '../utils/fetch-client' | ||
| */ | ||
| get (body = {}, config = { headers: { 'X-TENANT-ID': process.env.TENANT_ID, sensitive: true } }) { | ||
| get (body = {}, config = {}) { | ||
| config.params = body | ||
@@ -17,0 +17,0 @@ return client.get('/v2/deals', config) |
@@ -52,3 +52,3 @@ import axios from 'axios' | ||
| data: formData, | ||
| headers: { ...headers, 'Content-Type': 'multipart/form-data' }, | ||
| headers: { ...headers, 'Content-Type': 'multipart/form-data', 'X-TENANT-ID': process.env.TENANT_ID }, | ||
| ...config | ||
@@ -71,3 +71,3 @@ }) | ||
| const fieldName = type === 'local' ? 'id_number' : 'passport_number' | ||
| return axios.post(`${process.env.API_BASE_URL}${path}/sb_free_verification?api_key=${apiKey}&${fieldName}=${number}`, config) | ||
| return axios.post(`${process.env.API_BASE_URL}${path}/sb_free_verification?api_key=${apiKey}&${fieldName}=${number}`, config, { 'X-TENANT-ID': process.env.TENANT_ID }) | ||
| }, | ||
@@ -74,0 +74,0 @@ |
@@ -25,3 +25,4 @@ import axios from 'axios' | ||
| 'Cache-Control': 'no-cache', | ||
| 'Content-Type': 'application/x-www-form-urlencoded' | ||
| 'Content-Type': 'application/x-www-form-urlencoded', | ||
| 'X-TENANT-ID': process.env.TENANT_ID | ||
| }, | ||
@@ -34,7 +35,2 @@ adapter: retryAdapterEnhancer(cacheAdapterEnhancer(axios.defaults.adapter, { enabledByDefault: false, cacheFlag: 'useCache' }), { times: 0 }) | ||
| const { body, ...config } = options | ||
| if (config?.headers?.['X-TENANT-ID'] !== undefined) { | ||
| this.instance.defaults.headers.common['X-TENANT-ID'] = config?.headers?.['X-TENANT-ID'] | ||
| } else { | ||
| delete axios.defaults.headers.common['X-TENANT-ID'] | ||
| } | ||
| const response = await this.instance.get(path, config) | ||
@@ -53,2 +49,3 @@ return { | ||
| 'Content-Type': 'application/json', | ||
| 'X-TENANT-ID': process.env.TENANT_ID, | ||
| ...headers | ||
@@ -55,0 +52,0 @@ }, |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
205326
-0.06%4908
-0.06%12
33.33%