Update the axios instance to properly request to the API
This commit is contained in:
parent
50434f975c
commit
822abc3fae
1 changed files with 2 additions and 1 deletions
|
|
@ -17,11 +17,12 @@ const app = new Vue({
|
||||||
async tryLogin() {
|
async tryLogin() {
|
||||||
try {
|
try {
|
||||||
let r = await axios.post(
|
let r = await axios.post(
|
||||||
`/login`,
|
`./login`,
|
||||||
undefined,
|
undefined,
|
||||||
{ auth: this.login }
|
{ auth: this.login }
|
||||||
);
|
);
|
||||||
this.api = axios.create({
|
this.api = axios.create({
|
||||||
|
baseURL: window.location.href,
|
||||||
validateStatus: null,
|
validateStatus: null,
|
||||||
auth: this.login,
|
auth: this.login,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue