File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
templates/vue/store/modules/foo Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,10 @@ function reset(commit) {
36
36
return commit ( { { { uc } } } _LIST_RESET ) ;
37
37
}
38
38
39
- const getters = { } ;
39
+ const getters = {
40
+ items : state => state . items ,
41
+ view : state => state . view
42
+ } ;
40
43
41
44
const actions = {
42
45
getItems ( { commit, state } ) {
@@ -45,11 +48,9 @@ const actions = {
45
48
{ { { lc } } } Fetch ( '/{{{ name }}}' , state . filters )
46
49
. then ( response => response . json ( ) )
47
50
. then ( data => {
48
- const items = data [ '{{{ hydraPrefix }}}member' ] ;
49
- const viewItems = data [ '{{{ hydraPrefix }}}view' ] ;
50
51
loading ( commit , false ) ;
51
- success ( commit , items ) ;
52
- view ( commit , viewItems ) ;
52
+ success ( commit , data [ '{{{ hydraPrefix }}}member' ] ) ;
53
+ view ( commit , data [ '{{{ hydraPrefix }}}view' ] ) ;
53
54
} )
54
55
. catch ( e => {
55
56
loading ( commit , false ) ;
You can’t perform that action at this time.
0 commit comments