Remove initSettings
This commit is contained in:
parent
6f670efd5e
commit
0732bc36a8
|
@ -165,7 +165,6 @@ export default {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
axios.get('users/me/').then((response) => {
|
axios.get('users/me/').then((response) => {
|
||||||
logger.default.info('Successfully fetched user profile')
|
logger.default.info('Successfully fetched user profile')
|
||||||
dispatch('ui/initSettings', response.data.settings, { root: true })
|
|
||||||
dispatch('updateProfile', response.data)
|
dispatch('updateProfile', response.data)
|
||||||
dispatch('ui/fetchUnreadNotifications', null, { root: true })
|
dispatch('ui/fetchUnreadNotifications', null, { root: true })
|
||||||
if (response.data.permissions.library) {
|
if (response.data.permissions.library) {
|
||||||
|
|
|
@ -346,12 +346,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async initSettings ({ commit }, settings) {
|
|
||||||
settings = settings || {}
|
|
||||||
if (settings.language) {
|
|
||||||
commit('currentLanguage', settings.language)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
websocketEvent ({ state }, event) {
|
websocketEvent ({ state }, event) {
|
||||||
const handlers = state.websocketEventsHandlers[event.type]
|
const handlers = state.websocketEventsHandlers[event.type]
|
||||||
console.log('Dispatching websocket event', event, handlers)
|
console.log('Dispatching websocket event', event, handlers)
|
||||||
|
|
|
@ -133,7 +133,6 @@ describe('store/auth', () => {
|
||||||
{ type: 'permission', payload: {key: 'admin', status: true} }
|
{ type: 'permission', payload: {key: 'admin', status: true} }
|
||||||
],
|
],
|
||||||
expectedActions: [
|
expectedActions: [
|
||||||
{ type: 'ui/initSettings', payload: { root: true } },
|
|
||||||
{ type: 'updateProfile', payload: profile },
|
{ type: 'updateProfile', payload: profile },
|
||||||
{ type: 'ui/fetchUnreadNotifications', payload: null },
|
{ type: 'ui/fetchUnreadNotifications', payload: null },
|
||||||
{ type: 'favorites/fetch', payload: null, options: {root: true} },
|
{ type: 'favorites/fetch', payload: null, options: {root: true} },
|
||||||
|
|
Loading…
Reference in New Issue