From 864b8a149227c812fc14af6ba2ed5df6a5c9e166 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Tue, 10 Dec 2019 12:24:00 +0300 Subject: [PATCH] Remove MigrateToDB endpoint --- src/api/settings.js | 9 --------- src/store/modules/settings.js | 10 ++-------- src/views/settings/index.vue | 9 +++++---- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/src/api/settings.js b/src/api/settings.js index 55e35100..24f40367 100644 --- a/src/api/settings.js +++ b/src/api/settings.js @@ -20,15 +20,6 @@ export async function fetchSettings(authHost, token) { }) } -export async function migrateToDB(authHost, token) { - return await request({ - baseURL: baseName(authHost), - url: `/api/pleroma/admin/config/migrate_to_db`, - method: 'get', - headers: authHeaders(token) - }) -} - export async function updateSettings(configs, authHost, token) { return await request({ baseURL: baseName(authHost), diff --git a/src/store/modules/settings.js b/src/store/modules/settings.js index a3216331..adb2a05a 100644 --- a/src/store/modules/settings.js +++ b/src/store/modules/settings.js @@ -1,4 +1,4 @@ -import { fetchDescription, fetchSettings, migrateToDB, updateSettings, uploadMedia } from '@/api/settings' +import { fetchDescription, fetchSettings, updateSettings, uploadMedia } from '@/api/settings' import { parseTuples, valueHasTuples, wrapUpdatedSettings } from './normalizers' const settings = { @@ -60,17 +60,11 @@ const settings = { commit('SET_LOADING', true) const response = await fetchSettings(getters.authHost, getters.token) const description = await fetchDescription(getters.authHost, getters.token) - if (response.data.configs.length === 0) { - dispatch('MigrateToDB') - dispatch('FetchSettings') - } + commit('SET_DESCRIPTION', description.data) commit('SET_SETTINGS', response.data.configs) commit('SET_LOADING', false) }, - async MigrateToDB({ getters }) { - await migrateToDB(getters.authHost, getters.token) - }, RewriteConfig({ commit }, { tab, data }) { commit('REWRITE_CONFIG', { tab, data }) }, diff --git a/src/views/settings/index.vue b/src/views/settings/index.vue index 1d7b794c..daa2348e 100644 --- a/src/views/settings/index.vue +++ b/src/views/settings/index.vue @@ -5,12 +5,12 @@ - - - + + + @@ -29,6 +29,7 @@ +