Remove MigrateToDB endpoint

This commit is contained in:
Angelina Filippova 2019-12-10 12:24:00 +03:00
parent bf915110e5
commit 864b8a1492
3 changed files with 7 additions and 21 deletions

View file

@ -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),

View file

@ -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 })
},

View file

@ -5,12 +5,12 @@
<el-tab-pane :label="$t('settings.activityPub')" lazy>
<activity-pub/>
</el-tab-pane>
<el-tab-pane :label="$t('settings.autoLinker')" lazy>
<auto-linker/>
</el-tab-pane>
<el-tab-pane :label="$t('settings.auth')" lazy>
<authentication/>
</el-tab-pane>
<el-tab-pane :label="$t('settings.autoLinker')" lazy>
<auto-linker/>
</el-tab-pane>
<el-tab-pane :label="$t('settings.esshd')" lazy>
<esshd/>
</el-tab-pane>
@ -29,6 +29,7 @@
<el-tab-pane :label="$t('settings.frontend')" lazy>
<frontend/>
</el-tab-pane>
<!--
<el-tab-pane :label="$t('settings.gopher')" lazy>
<gopher/>
</el-tab-pane>
@ -70,7 +71,7 @@
</el-tab-pane>
<el-tab-pane :label="$t('settings.other')" lazy>
<other/>
</el-tab-pane>
</el-tab-pane> -->
</el-tabs>
</div>
</template>