update axios-init and db.go

This commit is contained in:
Hamidreza Ghavami
2023-05-05 22:57:47 +04:30
parent 26b748338a
commit 3ee57fd51d
3 changed files with 21 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
#app {
height: 100%;
height: 100vh;
}
.ant-space {

View File

@@ -3,10 +3,14 @@ axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
axios.interceptors.request.use(
config => {
config.data = Qs.stringify(config.data, {
arrayFormat: 'repeat'
});
if (config.data instanceof FormData) {
config.headers['Content-Type'] = 'multipart/form-data';
} else {
config.data = Qs.stringify(config.data, {
arrayFormat: 'repeat',
});
}
return config;
},
error => Promise.reject(error)
);
);