blob: 8f910ae123e9f8fc798f8fcbb3ebab43d2ff1667 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import config from '../../../dist/config.json';
export const actions = {
async nuxtClientInit({ commit, dispatch }) {
commit('config/set', config);
const cookies = this.$cookies.getAll();
if (!cookies.token) return dispatch('auth/logout');
commit('auth/setToken', cookies.token);
await dispatch('auth/verify');
}
/* alert({ commit }, payload) {
if (!payload) return commit('alert', null);
commit('alert', {
text: payload.text,
error: payload.error
});
} */
};
|