From f2f6e7be0b5354d041fe3c746fcf572ea06c7c3e Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 12 Mar 2024 13:29:53 +0100 Subject: [PATCH] refs #6930 perf: parallel calls --- front/core/services/auth.js | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/front/core/services/auth.js b/front/core/services/auth.js index e51a2ff12..8727f92bc 100644 --- a/front/core/services/auth.js +++ b/front/core/services/auth.js @@ -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() {