Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete loadConfig #3014

Merged
merged 2 commits into from
Jan 23, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions accounts/ui/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { RoleService_ListRoles } from '../client/settings'
import { injectAuthToken } from '../helpers/auth'

const state = {
config: null,
initialized: false,
failed: false,
accounts: {},
Expand All @@ -19,7 +18,6 @@ const state = {
}

const getters = {
config: state => state.config,
isInitialized: state => state.initialized,
hasFailed: state => state.failed,
getAccountsSorted: state => {
Expand All @@ -36,9 +34,6 @@ const getters = {
}

const mutations = {
LOAD_CONFIG (state, config) {
state.config = config
},
SET_INITIALIZED (state, value) {
state.initialized = value
},
Expand Down Expand Up @@ -81,10 +76,6 @@ const mutations = {
}

const actions = {
loadConfig ({ commit }, config) {
commit('LOAD_CONFIG', config)
},

async initialize ({ commit, dispatch, getters }) {
await Promise.all([
dispatch('fetchAccounts'),
Expand Down
10 changes: 0 additions & 10 deletions settings/ui/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ import axios from 'axios'
import keyBy from 'lodash-es/keyBy'

const state = {
config: null,
initialized: false,
bundles: {}
}

const getters = {
config: state => state.config,
initialized: state => state.initialized,
extensions: state => {
return [...new Set(Object.values(state.bundles).map(bundle => bundle.extension))].sort()
Expand All @@ -36,17 +34,9 @@ const mutations = {
SET_BUNDLES (state, bundles) {
state.bundles = keyBy(bundles, 'id')
},
LOAD_CONFIG (state, config) {
state.config = config
}
}

const actions = {
// Used by ocis-web.
loadConfig ({ commit }, config) {
commit('LOAD_CONFIG', config)
},

async initialize ({ commit, dispatch }) {
await dispatch('fetchBundles')
commit('SET_INITIALIZED', true)
Expand Down