refs #6930 perf: parallel calls

This commit is contained in:
Javier Segarra 2024-03-12 13:29:53 +01:00
parent 486b51bcfa
commit f2f6e7be0b
1 changed files with 12 additions and 13 deletions

View File

@ -98,20 +98,19 @@ export default class Auth {
}
logout() {
this.$http.post('VnUsers/logoutMultimedia', null, {headers: {'Authorization': this.vnToken.tokenMultimedia},
}).then(({data}) => {
if (data) {
this.$http.post('VnUsers/logout', null, {
headers: {Authorization: this.vnToken.token}
}).catch(() => {});
this.vnToken.unset();
this.loggedIn = false;
this.vnModules.reset();
this.aclService.reset();
this.$state.go('login');
}
this.$http.post('Accounts/logout', null, {headers: {'Authorization': this.vnToken.tokenMultimedia},
});
let promise = this.$http.post('VnUsers/logout', null, {
headers: {Authorization: this.vnToken.token}
}).catch(() => {});
this.vnToken.unset();
this.loggedIn = false;
this.vnModules.reset();
this.aclService.reset();
this.$state.go('login');
return promise;
}
loadAcls() {