mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
update backups api routes
This commit is contained in:
parent
89086a8003
commit
06eb2165ea
3 changed files with 6 additions and 6 deletions
|
@ -164,7 +164,7 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
api.post('backup', data).then(response => {
|
||||
api.post('backups', data).then(response => {
|
||||
this.$router.push({ name: 'backup-list', params: { id: this.id } })
|
||||
})
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ export default {
|
|||
data () {
|
||||
return {
|
||||
queries: [
|
||||
['GET', `backup/archives/${this.name}?with_details`]
|
||||
['GET', `backups/${this.name}?with_details`]
|
||||
],
|
||||
selected: [],
|
||||
error: '',
|
||||
|
@ -210,7 +210,7 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
api.post('backup/restore/' + this.name, data).then(response => {
|
||||
api.put(`backups/${this.name}/restore`, data).then(response => {
|
||||
this.isValid = null
|
||||
}).catch(err => {
|
||||
if (err.name !== 'APIBadRequestError') throw err
|
||||
|
@ -223,14 +223,14 @@ export default {
|
|||
const confirmed = await this.$askConfirmation(this.$i18n.t('confirm_delete', { name: this.name }))
|
||||
if (!confirmed) return
|
||||
|
||||
api.delete('backup/archives/' + this.name).then(() => {
|
||||
api.delete('backups/' + this.name).then(() => {
|
||||
this.$router.push({ name: 'backup-list', params: { id: this.id } })
|
||||
})
|
||||
},
|
||||
|
||||
downloadBackup () {
|
||||
const host = this.$store.getters.host
|
||||
window.open(`https://${host}/yunohost/api/backup/download/${this.name}`, '_blank')
|
||||
window.open(`https://${host}/yunohost/api/backups/${this.name}/download`, '_blank')
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ export default {
|
|||
data () {
|
||||
return {
|
||||
queries: [
|
||||
['GET', 'backup/archives?with_info']
|
||||
['GET', 'backups?with_info']
|
||||
],
|
||||
archives: undefined
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue