Permalink
Browse files

Finish part3 - customization

  • Loading branch information...
mtancoigne committed Sep 27, 2018
1 parent 3f06702 commit 315bc5a80956eacb0fe1c9fd079d32ee438d8a12
Showing with 15 additions and 1 deletion.
  1. +15 −1 src/store.js
@@ -12,5 +12,19 @@ export default new Vuex.Store({
users: Modulator.generateModule('users', 'user', 'users', true, false),
posts: Modulator.generateModule('posts', 'post', 'posts'),
postTypes: Modulator.generateModule('post_types', 'post_type', 'post_types'),
}
comments: {
state: {},
mutations: {
...Modulator.mutations('comment'),
my_custom_mutation: (state, data) => {/* do something */},
},
actions: {
...Modulator.actions('comments', 'comment', 'comments'),
createComment: ({commit}, payload) => {/* override an action from the Modulator */},
},
getters: {
...Modulator.getters('comment', 'comments'),
},
},
},
})

0 comments on commit 315bc5a

Please sign in to comment.