mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
frontend function consolidation part 1
This commit is contained in:
9
resources/js/store/modules/sharing.js
vendored
9
resources/js/store/modules/sharing.js
vendored
@@ -81,8 +81,7 @@ const actions = {
|
||||
})
|
||||
|
||||
axios
|
||||
.post('/api/share/cancel', {
|
||||
_method: 'post',
|
||||
.post('/api/share/revoke', {
|
||||
tokens: tokens
|
||||
})
|
||||
.then(() => {
|
||||
@@ -90,7 +89,7 @@ const actions = {
|
||||
items.forEach(item => {
|
||||
|
||||
// Remove item from file browser
|
||||
if ( getters.currentFolder , getters.currentFolder.location === 'shared' ) {
|
||||
if ( getters.currentFolder && getters.currentFolder.location === 'shared' ) {
|
||||
commit('REMOVE_ITEM', item.id)
|
||||
}
|
||||
|
||||
@@ -112,8 +111,8 @@ const actions = {
|
||||
getSingleFile: ({commit, state}) => {
|
||||
|
||||
let route = state.sharedDetail.protected
|
||||
? '/api/files/private'
|
||||
: '/api/files/' + router.currentRoute.params.token + '/public'
|
||||
? '/api/browse/files/private'
|
||||
: '/api/browse/files/' + router.currentRoute.params.token + '/public'
|
||||
|
||||
axios.get(route)
|
||||
.then(response => {
|
||||
|
||||
Reference in New Issue
Block a user