@campxdev/shared 0.2.11 → 0.2.13
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
|
@@ -32,8 +32,11 @@ export default function UserBox({
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
setPosting(true)
|
|
35
|
-
axios
|
|
36
|
-
|
|
35
|
+
axios({
|
|
36
|
+
method: 'POST',
|
|
37
|
+
baseURL: process.env.REACT_APP_API_HOST,
|
|
38
|
+
url: '/auth/logout',
|
|
39
|
+
})
|
|
37
40
|
.then((res) => {
|
|
38
41
|
setPosting(false)
|
|
39
42
|
window.location.href = '/'
|
package/src/config/axios.ts
CHANGED
|
@@ -70,7 +70,7 @@ axios.interceptors.response.use(
|
|
|
70
70
|
} else {
|
|
71
71
|
const method = err.response.config.method
|
|
72
72
|
if (method === 'get' || method === 'GET') {
|
|
73
|
-
setError(err.response.status, err.response.data.message)
|
|
73
|
+
// setError(err.response.status, err.response.data.message)
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -103,7 +103,8 @@ export function LoginForm() {
|
|
|
103
103
|
const onSubmit = async (values) => {
|
|
104
104
|
try {
|
|
105
105
|
const res = await axiosBase({
|
|
106
|
-
|
|
106
|
+
method: 'POST',
|
|
107
|
+
baseURL: process.env.REACT_APP_API_HOST,
|
|
107
108
|
url: '/auth/login',
|
|
108
109
|
data: {
|
|
109
110
|
values,
|