Revert "Merge pull request #369 from YunoHost/fix-array-args"

This reverts commit 711c8e8596, reversing
changes made to 89e2342b02.
This commit is contained in:
ljf 2021-06-03 18:10:55 +02:00
parent 711c8e8596
commit c4a641cd8e
3 changed files with 8 additions and 8 deletions

View file

@ -155,12 +155,12 @@ export default {
}, },
createBackup () { createBackup () {
const data = { 'apps[]': [], 'system[]': [] } const data = { apps: [], system: [] }
for (const item of this.selected) { for (const item of this.selected) {
if (item in this.system) { if (item in this.system) {
data['system[]'] = [...data['system[]'], ...this.system[item].value] data.system = [...data.system, ...this.system[item].value]
} else { } else {
data['apps[]'].push(item) data.apps.push(item)
} }
} }

View file

@ -201,12 +201,12 @@ export default {
) )
if (!confirmed) return if (!confirmed) return
const data = { 'apps[]': [], 'system[]': [], force: '' } const data = { apps: [], system: [], force: '' }
for (const item of this.selected) { for (const item of this.selected) {
if (item in this.system) { if (item in this.system) {
data['system[]'] = [...data['system[]'], ...this.system[item].value] data.system = [...data.system, ...this.system[item].value]
} else { } else {
data['apps[]'].push(item) data.apps.push(item)
} }
} }

View file

@ -121,7 +121,7 @@ export default {
} }
// Check that every migration's disclaimer has been checked. // Check that every migration's disclaimer has been checked.
if (Object.values(this.checked).every(value => value === true)) { if (Object.values(this.checked).every(value => value === true)) {
api.put('migrations/run?accept_disclaimer', 'migrations.run').then(() => { api.post('migrations/run?accept_disclaimer', 'migrations.run').then(() => {
this.$refs.view.fetchQueries() this.$refs.view.fetchQueries()
}) })
} }
@ -130,7 +130,7 @@ export default {
async skipMigration (id) { async skipMigration (id) {
const confirmed = await this.$askConfirmation(this.$i18n.t('confirm_migrations_skip')) const confirmed = await this.$askConfirmation(this.$i18n.t('confirm_migrations_skip'))
if (!confirmed) return if (!confirmed) return
api.put('/migrations/run', { skip: '', targets: id }, 'migration.skip').then(() => { api.post('/migrations/run', { skip: '', targets: id }, 'migration.skip').then(() => {
this.$refs.view.fetchQueries() this.$refs.view.fetchQueries()
}) })
} }