mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 19:10:40 +00:00
refactoring
This commit is contained in:
+5
-13
@@ -19,7 +19,7 @@ const actions = {
|
||||
getFolder: ({ commit, getters },{page, id}) => {
|
||||
return new Promise ((resolve, reject) => {
|
||||
|
||||
if( !page)
|
||||
if(!page)
|
||||
commit('LOADING_STATE', { loading: true, data: [] })
|
||||
|
||||
let currentPage = page || 1
|
||||
@@ -27,9 +27,7 @@ const actions = {
|
||||
axios
|
||||
.get(`${getters.api}/browse/folders/${id}/${getters.sorting.URI}&page=${currentPage}`)
|
||||
.then((response) => {
|
||||
commit('SET_PAGINATE', {
|
||||
paginate: response.data.meta.paginate
|
||||
})
|
||||
commit('SET_PAGINATE', response.data.meta.paginate)
|
||||
|
||||
commit('LOADING_STATE', {
|
||||
loading: false,
|
||||
@@ -70,9 +68,7 @@ const actions = {
|
||||
.get(getters.api + `/browse/latest?page=${currentPage}`)
|
||||
.then((response) => {
|
||||
|
||||
commit('SET_PAGINATE', {
|
||||
paginate: response.data.meta.paginate
|
||||
})
|
||||
commit('SET_PAGINATE', response.data.meta.paginate)
|
||||
|
||||
commit('LOADING_STATE', {
|
||||
loading: false,
|
||||
@@ -103,9 +99,7 @@ const actions = {
|
||||
.get(`${getters.api}/browse/share${getters.sorting.URI}&page=${currentPage}`)
|
||||
.then((response) => {
|
||||
|
||||
commit('SET_PAGINATE', {
|
||||
paginate: response.data.meta.paginate
|
||||
})
|
||||
commit('SET_PAGINATE', response.data.meta.paginate)
|
||||
|
||||
commit('LOADING_STATE', {
|
||||
loading: false,
|
||||
@@ -136,9 +130,7 @@ const actions = {
|
||||
.get(`${getters.api}/browse/trash/${id}/${getters.sorting.URI}&page=${currentPage}`)
|
||||
.then((response) => {
|
||||
|
||||
commit('SET_PAGINATE', {
|
||||
paginate: response.data.meta.paginate
|
||||
})
|
||||
commit('SET_PAGINATE', response.data.meta.paginate)
|
||||
|
||||
commit('LOADING_STATE', {
|
||||
loading: false,
|
||||
|
||||
Reference in New Issue
Block a user