#7750 - first-beta-review #95

Merged
jsegarra merged 26 commits from wbuezas/hedera-web-mindshore:first-beta-review into beta 2024-12-09 23:18:07 +00:00
1 changed files with 4 additions and 0 deletions
Showing only changes of commit 3c3e88b044 - Show all commits

View File

@ -3,6 +3,7 @@ import { Connection } from '../js/db/connection';
import { useUserStore } from 'stores/user';
import axios from 'axios';
import useNotify from 'src/composables/useNotify.js';
import { useAppStore } from 'src/stores/app';
const { notify } = useNotify();
// Be careful when using SSR for cross-request state pollution
@ -37,9 +38,12 @@ const onResponseError = error => {
export default boot(({ app }) => {
const userStore = useUserStore();
const appStore = useAppStore();
console.log('appStore', appStore);
function addToken(config) {
if (userStore.token) {
config.headers.Authorization = userStore.token;
config.headers['Accept-Language'] = appStore.siteLang;
}
return config;
}