Skip to content
Snippets Groups Projects
Commit 7c78cb77 authored by Angelina Filippova's avatar Angelina Filippova
Browse files

Fix mutation that set fetched settings

parent c4746bf9
No related branches found
No related tags found
1 merge request!77Ability to remove settings from db
This commit is part of merge request !77. Comments created here will be created in the context of that merge request.
...@@ -5,23 +5,8 @@ import _ from 'lodash' ...@@ -5,23 +5,8 @@ import _ from 'lodash'
const settings = { const settings = {
state: { state: {
description: [], description: [],
settings: { settings: {},
':auto_linker': {},
':cors_plug': {},
':esshd': {},
':http_signatures': {},
':logger': {},
':mime': {},
':phoenix': {},
':pleroma': {},
':prometheus': {},
':quack': {},
':tesla': {},
':ueberauth': {},
':web_push_encryption': {}
},
updatedSettings: {}, updatedSettings: {},
ignoredIfNotEnabled: ['enabled', 'handler', 'password_authenticator', 'port', 'priv_dir'],
loading: true loading: true
}, },
mutations: { mutations: {
...@@ -45,9 +30,9 @@ const settings = { ...@@ -45,9 +30,9 @@ const settings = {
const parsedValue = valueHasTuples(key, value) const parsedValue = valueHasTuples(key, value)
? { value: parseNonTuples(key, value) } ? { value: parseNonTuples(key, value) }
: parseTuples(value, key) : parseTuples(value, key)
acc[group][key] = parsedValue acc[group] = acc[group] ? { ...acc[group], [key]: parsedValue } : { [key]: parsedValue }
return acc return acc
}, state.settings) }, {})
state.settings = newSettings state.settings = newSettings
}, },
UPDATE_SETTINGS: (state, { group, key, input, value, type }) => { UPDATE_SETTINGS: (state, { group, key, input, value, type }) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment