@campxdev/shared 3.1.25 → 3.1.26
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
|
@@ -55,7 +55,7 @@ export function LoginForm({
|
|
|
55
55
|
try {
|
|
56
56
|
const res = await axiosBase({
|
|
57
57
|
method: 'POST',
|
|
58
|
-
baseURL: process.env.REACT_APP_API_HOST,
|
|
58
|
+
baseURL: process.env.REACT_APP_API_HOST || '/api',
|
|
59
59
|
url: loginUrl ? loginUrl : `/auth-server/auth/login`,
|
|
60
60
|
data: {
|
|
61
61
|
...values,
|
package/src/config/axios.ts
CHANGED
|
@@ -9,7 +9,7 @@ const clientId = window.location.pathname.split('/')[1] ?? 'campx_dev'
|
|
|
9
9
|
const evaluatorKey = Cookies.get('campx_evaluator_key')
|
|
10
10
|
|
|
11
11
|
const axiosEvaluator = Axios.create({
|
|
12
|
-
baseURL: process.env.REACT_APP_API_HOST,
|
|
12
|
+
baseURL: process.env.REACT_APP_API_HOST || '/api',
|
|
13
13
|
withCredentials: true,
|
|
14
14
|
headers: {
|
|
15
15
|
'x-tenant-id': clientId,
|
|
@@ -11,7 +11,7 @@ const evaluatorKey = Cookies.get('campx_evaluator_key')
|
|
|
11
11
|
const openPaymentsKey = Cookies.get('campx_open_payments_key')
|
|
12
12
|
|
|
13
13
|
const axiosTenant = Axios.create({
|
|
14
|
-
baseURL: process.env.REACT_APP_API_HOST,
|
|
14
|
+
baseURL: process.env.REACT_APP_API_HOST || '/api',
|
|
15
15
|
withCredentials: true,
|
|
16
16
|
headers: {
|
|
17
17
|
'x-tenant-id': clientId,
|
package/src/utils/logout.ts
CHANGED
|
@@ -4,7 +4,7 @@ import axios, { axiosErrorToast } from '../config/axios'
|
|
|
4
4
|
export default function logout() {
|
|
5
5
|
axios({
|
|
6
6
|
method: 'POST',
|
|
7
|
-
baseURL: process.env.REACT_APP_API_HOST,
|
|
7
|
+
baseURL: process.env.REACT_APP_API_HOST || '/api',
|
|
8
8
|
url: '/auth-server/auth/logout',
|
|
9
9
|
})
|
|
10
10
|
.then((res) => {
|