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

This commit is contained in:
Andrea Vos 2021-06-09 18:35:42 +02:00
parent 2fb294f7f4
commit 00763c3443

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);