From c4a641cd8e2fe9091f15cae625d4bfa3dc5b7e51 Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 3 Jun 2021 18:10:55 +0200 Subject: [PATCH] Revert "Merge pull request #369 from YunoHost/fix-array-args" This reverts commit 711c8e8596fdb611386b6fe395dfbc42d2b39d9c, reversing changes made to 89e2342b0256602de2371879d1fd70cbb0e97421. --- app/src/views/backup/BackupCreate.vue | 6 +++--- app/src/views/backup/BackupInfo.vue | 6 +++--- app/src/views/tool/ToolMigrations.vue | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/views/backup/BackupCreate.vue b/app/src/views/backup/BackupCreate.vue index 79169af1..7ac84154 100644 --- a/app/src/views/backup/BackupCreate.vue +++ b/app/src/views/backup/BackupCreate.vue @@ -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) } } diff --git a/app/src/views/backup/BackupInfo.vue b/app/src/views/backup/BackupInfo.vue index a88455ac..86ba2acd 100644 --- a/app/src/views/backup/BackupInfo.vue +++ b/app/src/views/backup/BackupInfo.vue @@ -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) } } diff --git a/app/src/views/tool/ToolMigrations.vue b/app/src/views/tool/ToolMigrations.vue index 8ea1a4e5..638b0bf2 100644 --- a/app/src/views/tool/ToolMigrations.vue +++ b/app/src/views/tool/ToolMigrations.vue @@ -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.put('migrations/run?accept_disclaimer', 'migrations.run').then(() => { + api.post('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.put('/migrations/run', { skip: '', targets: id }, 'migration.skip').then(() => { + api.post('/migrations/run', { skip: '', targets: id }, 'migration.skip').then(() => { this.$refs.view.fetchQueries() }) }