Frontend created and rewritten a few times, with some backend fixes #1
|
@ -1,6 +1,6 @@
|
||||||
import axios, {AxiosError} from 'axios'
|
import axios, {AxiosError} from 'axios'
|
||||||
|
|
||||||
/* Base domain for all request */
|
/* Base domain for all request */
|
||||||
export const baseURL = import.meta.env.VITE_URL_DOCUMENT
|
export const baseURL = import.meta.env.VITE_URL_DOCUMENT
|
||||||
|
|
||||||
/* Config Client*/
|
/* Config Client*/
|
||||||
|
@ -22,7 +22,7 @@ Client.interceptors.response.use(
|
||||||
error.response.data.error.message : 'Unexpected error'
|
error.response.data.error.message : 'Unexpected error'
|
||||||
const code = error.code ? Number(error.response?.status) : 500
|
const code = error.code ? Number(error.response?.status) : 500
|
||||||
const standardizedError = new SimpleError(code, msg)
|
const standardizedError = new SimpleError(code, msg)
|
||||||
|
|
||||||
return Promise.reject(standardizedError)
|
return Promise.reject(standardizedError)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -39,4 +39,4 @@ class SimpleError extends Error implements ISimpleError {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Client
|
export default Client
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -5,8 +5,8 @@
|
||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<title>Vite Vasanko</title>
|
<title>Vite Vasanko</title>
|
||||||
<script type="module" crossorigin src="/assets/index-25722397.js"></script>
|
<script type="module" crossorigin src="/assets/index-a4e1dd71.js"></script>
|
||||||
<link rel="stylesheet" href="/assets/index-213aec14.css">
|
<link rel="stylesheet" href="/assets/index-f91a1fb3.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user