fix auth (#24), update deps, local user_locale

This commit is contained in:
les
2019-09-17 16:05:46 +02:00
parent 5f94f72912
commit 46bc1854de
7 changed files with 36 additions and 33 deletions

View File

@@ -6,11 +6,9 @@ import locales from '../locales'
Vue.use(VueI18n)
export default async ({ app, store }) => {
// Set i18n instance on app
// This way we can use it in middleware and pages asyncData/fetch
const user_locale = await app.$axios.$get('/settings/user_locale')
for (const lang in user_locale) {
// Set i18n instance on app
for (const lang in store.state.user_locale) {
if (locales[lang]) { merge(locales[lang], user_locale[lang]) }
}