Browse Source

fix(gui): axios base url correction

re #307

Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
pull/341/head
Pranav C 4 years ago
parent
commit
7fbefd8157
  1. 7
      packages/nc-gui/store/sqlMgr.js

7
packages/nc-gui/store/sqlMgr.js

@ -421,7 +421,7 @@ export const actions = {
return (await this.$axios({
url: '?q=sqlOp_' + op,
baseURL: `${$this.axios.defaults.baseURL}/dashboard`,
baseURL: `${this.$axios.defaults.baseURL}/dashboard`,
data: formData, //{api: op, ...args, args: opArgs},
headers,
method: 'post',
@ -429,7 +429,10 @@ export const actions = {
...(cusAxiosOptions || {})
})).data;
} catch (e) {
throw new Error(e.response.data.msg);
if (e.response && e.response.data) {
throw new Error(e.response.data.msg);
}
throw e;
}
},

Loading…
Cancel
Save