mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
#215 better server error handling - fix login / option passing
This commit is contained in:
parent
2fb294f7f4
commit
00763c3443
@ -30,9 +30,9 @@
|
|||||||
this.$refs.dialogue.show(true, message, color, resolve, reject);
|
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) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.$axios.$post(url, data, {timeout})
|
this.$axios.$post(url, data, {...options, timeout})
|
||||||
.then(data => resolve(data))
|
.then(data => resolve(data))
|
||||||
.catch(async e => {
|
.catch(async e => {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user