fix: modules non-string config + live trail logging

This commit is contained in:
Nicolas Giard
2018-09-30 14:20:26 -04:00
parent 32a537ec06
commit 904e2a6efb
18 changed files with 141 additions and 37 deletions

View File

@@ -42,7 +42,7 @@ module.exports = {
await WIKI.models.searchEngines.query().patch({
isEnabled: searchEngine.isEnabled,
config: _.reduce(searchEngine.config, (result, value, key) => {
_.set(result, `${value.key}`, value.value)
_.set(result, `${value.key}`, _.get(JSON.parse(value.value), 'v', null))
return result
}, {})
}).where('key', searchEngine.key)