Skip to content

Commit b3dbb61

Browse files
committed
Vuex: a new type of message included. Validation.
1 parent 694d092 commit b3dbb61

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

client/src/store/actions.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ export default {
1616

1717
resetMessages({ commit }) {
1818
commit(TYPES.MAIN_SET_MESSAGE, { type: 'success', message: '' })
19-
commit(TYPES.MAIN_SET_MESSAGE, { type: 'error', message: '' })
19+
commit(TYPES.MAIN_SET_MESSAGE, { type: 'error', message: [] })
2020
commit(TYPES.MAIN_SET_MESSAGE, { type: 'warning', message: '' })
21+
commit(TYPES.MAIN_SET_MESSAGE, { type: 'validation', message: {} })
2122
},
2223

2324
setToken({ commit }, token) {

client/src/store/state.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ export default {
55
user: {},
66
messages: {
77
success: '',
8-
error: '',
8+
error: [],
99
warning: '',
10+
validation: {},
1011
},
1112
fetching: false,
1213
}

0 commit comments

Comments
 (0)