mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
api refactoring
This commit is contained in:
@@ -50,7 +50,7 @@ export default {
|
||||
reader.readAsDataURL(file)
|
||||
|
||||
// Update user avatar
|
||||
this.$updateImage('/user/settings', 'avatar', event.target.files[0])
|
||||
this.$updateAvatar(event.target.files[0])
|
||||
} else {
|
||||
alert(this.$t('wrong_image_error'))
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ export default {
|
||||
|
||||
// Get route
|
||||
let route = {
|
||||
RequestUpload: `/api/upload-request/${this.$router.currentRoute.params.token}/upload/remote`,
|
||||
RequestUpload: `/api/file-request/${this.$router.currentRoute.params.token}/upload/remote`,
|
||||
Public: `/api/editor/upload/remote/${this.$router.currentRoute.params.token}`,
|
||||
}[this.$router.currentRoute.name] || '/api/upload/remote'
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ export default {
|
||||
this.isSendingBillingAlert = true
|
||||
|
||||
axios
|
||||
.patch(`/api/subscriptions/billing-alerts/${this.user.data.relationships.alert.data.id}`, {
|
||||
.put('/api/subscriptions/billing-alert', {
|
||||
amount: this.billingAlertAmount,
|
||||
})
|
||||
.then(() => {
|
||||
@@ -184,7 +184,7 @@ export default {
|
||||
this.isSendingBillingAlert = true
|
||||
|
||||
axios
|
||||
.post('/api/subscriptions/billing-alerts', {
|
||||
.post('/api/subscriptions/billing-alert', {
|
||||
amount: this.billingAlertAmount,
|
||||
})
|
||||
.then(() => {
|
||||
@@ -222,7 +222,7 @@ export default {
|
||||
events.$on('action:confirmed', (data) => {
|
||||
if (data.operation === 'delete-billing-alert')
|
||||
axios
|
||||
.delete(`/api/subscriptions/billing-alerts/${this.user.data.relationships.alert.data.id}`)
|
||||
.delete('/api/subscriptions/billing-alert')
|
||||
.then(() => {
|
||||
this.$store.dispatch('getAppData')
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ export default {
|
||||
|
||||
// Send request to get share link
|
||||
axios
|
||||
.post(`/api/upload-request`, this.form)
|
||||
.post(`/api/file-request`, this.form)
|
||||
.then((response) => {
|
||||
this.generatedUploadRequest = response.data
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user