Find data in description for settings that don't have a key

This commit is contained in:
Angelina Filippova 2020-01-27 00:23:54 +03:00
parent fb5bfca562
commit 389fbf50a3
2 changed files with 2 additions and 2 deletions

View file

@ -62,7 +62,7 @@ export default {
return _.get(this.settings.settings, [':pleroma', ':oauth2']) || {}
},
pleromaAuthenticator() {
return this.settings.description.find(setting => setting.description === 'Authenticator')
return this.settings.description.find(setting => setting.children && setting.children[0].key === 'Pleroma.Web.Auth.Authenticator')
},
pleromaAuthenticatorData() {
return _.get(this.settings.settings, [':pleroma', 'Pleroma.Web.Auth.Authenticator']) || {}

View file

@ -50,7 +50,7 @@ export default {
'settings'
]),
adminToken() {
return this.settings.description.find(setting => setting.description === `Allows to set a token that can be used to authenticate with the admin api without using an actual user by giving it as the 'admin_token' parameter`)
return this.settings.description.find(setting => setting.children && setting.children[0].key === ':admin_token')
},
adminTokenData() {
return _.get(this.settings.settings, [':pleroma', ':admin_token']) || {}