diff --git a/front/core/services/auth.js b/front/core/services/auth.js index e51a2ff123..8727f92bc3 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() {