Skip to content

Commit adaa3b3

Browse files
committed
Updated list store module for foo
1 parent 726ea4a commit adaa3b3

File tree

1 file changed

+6
-5
lines changed
  • templates/vue/store/modules/foo

1 file changed

+6
-5
lines changed

templates/vue/store/modules/foo/list.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ function reset(commit) {
3636
return commit({{{ uc }}}_LIST_RESET);
3737
}
3838

39-
const getters = {};
39+
const getters = {
40+
items: state => state.items,
41+
view: state => state.view
42+
};
4043

4144
const actions = {
4245
getItems({ commit, state }) {
@@ -45,11 +48,9 @@ const actions = {
4548
{{{ lc }}}Fetch('/{{{ name }}}', state.filters)
4649
.then(response => response.json())
4750
.then(data => {
48-
const items = data['{{{ hydraPrefix }}}member'];
49-
const viewItems = data['{{{ hydraPrefix }}}view'];
5051
loading(commit, false);
51-
success(commit, items);
52-
view(commit, viewItems);
52+
success(commit, data['{{{ hydraPrefix }}}member']);
53+
view(commit, data['{{{ hydraPrefix }}}view']);
5354
})
5455
.catch(e => {
5556
loading(commit, false);

0 commit comments

Comments
 (0)