mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-21 20:44:42 +00:00
- API routes refactoring
- setup:dev artisan command
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
axios.get('/api/public/pricing')
|
||||
axios.get('/api/pricing')
|
||||
.then(response => {
|
||||
this.plans = response.data
|
||||
this.$emit('load', response.data)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
axios.get('/api/public/pricing')
|
||||
axios.get('/api/pricing')
|
||||
.then(response => {
|
||||
this.plans = response.data.filter(plan => {
|
||||
return plan.data.attributes.capacity > this.user.data.attributes.storage_capacity
|
||||
|
||||
+5
-5
@@ -77,7 +77,7 @@ const actions = {
|
||||
})
|
||||
|
||||
axios
|
||||
.get(getters.api + '/latest' )
|
||||
.get(getters.api + '/browse/latest' )
|
||||
.then(response => {
|
||||
commit('LOADING_STATE', {loading: false, data: response.data})
|
||||
events.$emit('scrollTop')
|
||||
@@ -98,7 +98,7 @@ const actions = {
|
||||
commit('STORE_CURRENT_FOLDER', currentFolder)
|
||||
|
||||
axios
|
||||
.get(getters.api + '/shared-all' + getters.sorting.URI)
|
||||
.get(getters.api + '/browse/shared-all' + getters.sorting.URI)
|
||||
.then(response => {
|
||||
commit('LOADING_STATE', {loading: false, data: response.data})
|
||||
commit('STORE_PREVIOUS_FOLDER', currentFolder)
|
||||
@@ -118,7 +118,7 @@ const actions = {
|
||||
})
|
||||
|
||||
axios
|
||||
.get(getters.api + '/participant-uploads' + getters.sorting.URI)
|
||||
.get(getters.api + '/browse/participant-uploads' + getters.sorting.URI)
|
||||
.then(response => {
|
||||
commit('LOADING_STATE', {loading: false, data: response.data})
|
||||
|
||||
@@ -160,7 +160,7 @@ const actions = {
|
||||
else if (getters.sharedDetail && !getters.sharedDetail.protected)
|
||||
route = '/api/search/public/' + router.currentRoute.params.token
|
||||
else
|
||||
route = '/api/search'
|
||||
route = '/api/browse/search'
|
||||
|
||||
axios
|
||||
.get(route, {
|
||||
@@ -183,7 +183,7 @@ const actions = {
|
||||
else if (getters.sharedDetail && !getters.sharedDetail.protected)
|
||||
route = '/api/navigation/public/' + router.currentRoute.params.token
|
||||
else
|
||||
route = '/api/navigation'
|
||||
route = '/api/browse/navigation'
|
||||
|
||||
axios
|
||||
.get(route + getters.sorting.URI)
|
||||
|
||||
+2
-2
@@ -291,7 +291,7 @@ const actions = {
|
||||
commit('CLEAR_FILEINFO_DETAIL')
|
||||
|
||||
axios
|
||||
.post(getters.api + '/restore-items', {
|
||||
.post(getters.api + '/trash/restore-items', {
|
||||
to_home: restoreToHome,
|
||||
data: itemToRestore
|
||||
})
|
||||
@@ -386,7 +386,7 @@ const actions = {
|
||||
commit('LOADING_STATE', { loading: true, data: [] })
|
||||
|
||||
axios
|
||||
.post(getters.api + '/empty-trash', {
|
||||
.post(getters.api + '/trash/empty-trash', {
|
||||
_method: 'delete'
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
+2
-2
@@ -48,7 +48,7 @@ const actions = {
|
||||
}, 300)
|
||||
|
||||
axios
|
||||
.get(getters.api + '/logout')
|
||||
.get(getters.api + '/user/logout')
|
||||
.then(() => {
|
||||
clearTimeout(popup)
|
||||
commit('DESTROY_DATA')
|
||||
@@ -93,7 +93,7 @@ const actions = {
|
||||
context.commit('ADD_TO_FAVOURITES', pushToFavorites)
|
||||
|
||||
axios
|
||||
.post(context.getters.api + '/folders/favourites', {
|
||||
.post(context.getters.api + '/browse/folders/favourites', {
|
||||
folders: addFavourites
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
|
||||
this.isFlushingCache = true
|
||||
|
||||
axios.get('/api/flush-cache')
|
||||
axios.get('/api/settings/flush-cache')
|
||||
.then(() => {
|
||||
events.$emit('toaster', {
|
||||
type: 'success',
|
||||
|
||||
@@ -452,7 +452,7 @@
|
||||
created() {
|
||||
|
||||
// Get setup intent for stripe
|
||||
axios.get('/api/stripe/setup-intent')
|
||||
axios.get('/api/subscription/setup-intent')
|
||||
.then(response => {
|
||||
this.clientSecret = response.data.client_secret
|
||||
})
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
document.head.appendChild(StripeElementsScript)
|
||||
|
||||
// Get setup intent for stripe
|
||||
axios.get('/api/stripe/setup-intent')
|
||||
axios.get('/api/subscription/setup-intent')
|
||||
.then(response => {
|
||||
this.clientSecret = response.data.client_secret
|
||||
|
||||
|
||||
Reference in New Issue
Block a user