#215 better server error handling - fix login / option passing

This commit is contained in:
Avris 2021-06-09 18:35:42 +02:00
parent a00ecb97d6
commit 938939090c
1 changed files with 2 additions and 2 deletions

View File

@ -30,9 +30,9 @@
this.$refs.dialogue.show(true, message, color, resolve, reject);
});
};
Vue.prototype.$post = (url, data, timeout = 30000) => {
Vue.prototype.$post = (url, data, options = {}, timeout = 30000) => {
return new Promise((resolve, reject) => {
this.$axios.$post(url, data, {timeout})
this.$axios.$post(url, data, {...options, timeout})
.then(data => resolve(data))
.catch(async e => {
console.error(e);