@campxdev/campx-web-utils 0.1.17 → 0.1.18
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/config/axios.ts +1 -10
package/package.json
CHANGED
package/src/config/axios.ts
CHANGED
|
@@ -10,15 +10,6 @@ const tenantCode =
|
|
|
10
10
|
: window.location.hostname.split(".")[0];
|
|
11
11
|
const institutionCode = window.location.pathname.split("/")[1];
|
|
12
12
|
|
|
13
|
-
export const formatParams = (params: any) => {
|
|
14
|
-
return Object.fromEntries(
|
|
15
|
-
Object.entries(params ?? {})?.map((i) => [
|
|
16
|
-
i[0],
|
|
17
|
-
i[1] === "__empty__" ? "" : i[1],
|
|
18
|
-
])
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
13
|
export const axios = Axios.create({
|
|
23
14
|
baseURL: process.env.REACT_APP_API_HOST,
|
|
24
15
|
withCredentials: true,
|
|
@@ -30,7 +21,7 @@ export const axios = Axios.create({
|
|
|
30
21
|
|
|
31
22
|
axios.interceptors.request.use(
|
|
32
23
|
function (config: InternalAxiosRequestConfig) {
|
|
33
|
-
const params =
|
|
24
|
+
const params = config?.params;
|
|
34
25
|
|
|
35
26
|
const sessionKey = Cookies.get("campx_session_key");
|
|
36
27
|
const openPaymentsKey = Cookies.get("campx_open_payments_key");
|