7152-devToTest_2414 #2228

Merged
alexm merged 636 commits from 7152-devToTest_2414 into test 2024-03-28 08:26:34 +00:00
2 changed files with 14 additions and 11 deletions
Showing only changes of commit fdc5ea244f - Show all commits

View File

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

View File

@ -19,7 +19,7 @@ function interceptor($q, vnApp, $translate) {
if (config.url.charAt(0) !== '/' && apiPath) if (config.url.charAt(0) !== '/' && apiPath)
config.url = `${apiPath}${config.url}`; config.url = `${apiPath}${config.url}`;
if (token) if (token && !config.headers.Authorization)
config.headers.Authorization = token; config.headers.Authorization = token;
if ($translate.use()) if ($translate.use())
config.headers['Accept-Language'] = $translate.use(); config.headers['Accept-Language'] = $translate.use();