|
|
@@ -30,7 +30,7 @@ const _arrangeByType = postsList => {
|
|
30
|
30
|
}
|
|
31
|
31
|
|
|
32
|
32
|
const actions = {
|
|
33
|
|
- getAllPosts({ commit }, { sortType, params }) {
|
|
|
33
|
+ async getAllPosts({ commit }, { sortType, params }) {
|
|
34
|
34
|
commit('CLEAR_POSTS')
|
|
35
|
35
|
commit('POSTS_LOADED', false)
|
|
36
|
36
|
const storeFetch = (posts => {
|
|
|
@@ -41,7 +41,7 @@ const actions = {
|
|
41
|
41
|
commit('STORE_FETCHED_POSTS', { posts: repacked })
|
|
42
|
42
|
commit('POSTS_LOADED', true)
|
|
43
|
43
|
})
|
|
44
|
|
- return api.getByType({ type: 'post', sort: sortType, params, cb: storeFetch })
|
|
|
44
|
+ return await api.getByType({ type: 'post', sort: sortType, params, cb: storeFetch })
|
|
45
|
45
|
},
|
|
46
|
46
|
getMorePosts({ commit }, { sortType, params }) {
|
|
47
|
47
|
const storeFetch = (posts => {
|