@campxdev/shared 1.11.7-0.alpha.41 → 1.11.7-0.alpha.43

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/shared",
3
- "version": "1.11.7-0.alpha.41",
3
+ "version": "1.11.7-0.alpha.43",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -10,6 +10,8 @@ const institutionId =
10
10
  Cookies.get('campx_institution') ?? window.location.pathname.split('/')[1]
11
11
  const openPaymentsKey = Cookies.get('campx_open_payments_key')
12
12
 
13
+ const isProduction = process.env.NODE_ENV === 'production'
14
+
13
15
  export const formatParams = (params) => {
14
16
  return Object.fromEntries(
15
17
  Object.entries(params ?? {})?.map((i) => [
@@ -24,8 +26,12 @@ let axios = Axios.create({
24
26
  withCredentials: true,
25
27
  headers: {
26
28
  'x-tenant-id': tenantId,
27
- 'x-institution-code': institutionId,
28
- campx_session_key: sessionKey,
29
+ ...(!isProduction
30
+ ? {
31
+ 'x-institution-code': institutionId,
32
+ campx_session_key: sessionKey,
33
+ }
34
+ : {}),
29
35
  },
30
36
  })
31
37