mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Merge pull request #369 from YunoHost/fix-array-args
[fix] Request with array args
This commit is contained in:
commit
711c8e8596
3 changed files with 8 additions and 8 deletions
|
@ -155,12 +155,12 @@ export default {
|
|||
},
|
||||
|
||||
createBackup () {
|
||||
const data = { apps: [], system: [] }
|
||||
const data = { 'apps[]': [], 'system[]': [] }
|
||||
for (const item of this.selected) {
|
||||
if (item in this.system) {
|
||||
data.system = [...data.system, ...this.system[item].value]
|
||||
data['system[]'] = [...data['system[]'], ...this.system[item].value]
|
||||
} else {
|
||||
data.apps.push(item)
|
||||
data['apps[]'].push(item)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -201,12 +201,12 @@ export default {
|
|||
)
|
||||
if (!confirmed) return
|
||||
|
||||
const data = { apps: [], system: [], force: '' }
|
||||
const data = { 'apps[]': [], 'system[]': [], force: '' }
|
||||
for (const item of this.selected) {
|
||||
if (item in this.system) {
|
||||
data.system = [...data.system, ...this.system[item].value]
|
||||
data['system[]'] = [...data['system[]'], ...this.system[item].value]
|
||||
} else {
|
||||
data.apps.push(item)
|
||||
data['apps[]'].push(item)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ export default {
|
|||
}
|
||||
// Check that every migration's disclaimer has been checked.
|
||||
if (Object.values(this.checked).every(value => value === true)) {
|
||||
api.post('migrations/run?accept_disclaimer', 'migrations.run').then(() => {
|
||||
api.put('migrations/run?accept_disclaimer', 'migrations.run').then(() => {
|
||||
this.$refs.view.fetchQueries()
|
||||
})
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ export default {
|
|||
async skipMigration (id) {
|
||||
const confirmed = await this.$askConfirmation(this.$i18n.t('confirm_migrations_skip'))
|
||||
if (!confirmed) return
|
||||
api.post('/migrations/run', { skip: '', targets: id }, 'migration.skip').then(() => {
|
||||
api.put('/migrations/run', { skip: '', targets: id }, 'migration.skip').then(() => {
|
||||
this.$refs.view.fetchQueries()
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue