Fixed input serializer for setting's PUT methods in Admin APIs

refs https://github.com/TryGhost/Ghost/issues/10318

- There was a copy/paste error and we didn't have a test to pick it up. Will follow up with a regression test to make sure it doesn't happen again
This commit is contained in:
Nazar Gargol 2020-06-24 22:11:03 +12:00
parent f415389829
commit 118b7033e0
2 changed files with 8 additions and 8 deletions

View File

@ -55,12 +55,12 @@ module.exports = {
setting.key = 'codeinjection_foot';
}
if (frame.options.key === 'active_timezone') {
frame.options.key = 'timezone';
if (setting.key === 'active_timezone') {
setting.key = 'timezone';
}
if (frame.options.key === 'default_locale') {
frame.options.key = 'lang';
if (setting.key === 'default_locale') {
setting.key = 'lang';
}
if (['cover_image', 'icon', 'logo'].includes(setting.key)) {

View File

@ -54,12 +54,12 @@ module.exports = {
setting.key = 'codeinjection_foot';
}
if (frame.options.key === 'default_locale') {
frame.options.key = 'lang';
if (setting.key === 'default_locale') {
setting.key = 'lang';
}
if (frame.options.key === 'active_timezone') {
frame.options.key = 'timezone';
if (setting.key === 'active_timezone') {
setting.key = 'timezone';
}
if (['cover_image', 'icon', 'logo'].includes(setting.key)) {