mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-23 12:21:08 +00:00
fix: axios file
This commit is contained in:
parent
9b9030cb7c
commit
ecc9c42041
14
web/utils/ctx-axios.ts
Normal file
14
web/utils/ctx-axios.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import axios from 'axios';
|
||||
|
||||
const api = axios.create({
|
||||
baseURL: process.env.API_BASE_URL,
|
||||
});
|
||||
|
||||
api.defaults.timeout = 10000;
|
||||
|
||||
api.interceptors.response.use(
|
||||
response => response.data,
|
||||
err => Promise.reject(err),
|
||||
);
|
||||
|
||||
export default api;
|
Loading…
Reference in New Issue
Block a user