From 41ab061c8e397760f2abf84889a07a21dbac8740 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 28 Nov 2024 10:34:47 +0000 Subject: [PATCH] Allow branding settings to be cleared in the UI Fixes 4831 --- forge/routes/api/settings.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/forge/routes/api/settings.js b/forge/routes/api/settings.js index 6a5c1b42da..3e98434421 100644 --- a/forge/routes/api/settings.js +++ b/forge/routes/api/settings.js @@ -75,7 +75,7 @@ module.exports = async function (app) { 'branding:account:signUpLeftBanner' ].forEach(prop => { const value = app.settings.get(prop) - if (value) { + if (value !== null) { response[prop] = value } }) @@ -109,7 +109,7 @@ module.exports = async function (app) { 'branding:account:signUpLeftBanner' ].forEach(prop => { const value = app.settings.get(prop) - if (value) { + if (value != null) { publicSettings[prop] = value } }) @@ -121,7 +121,6 @@ module.exports = async function (app) { } publicSettings.adwords = adwords } - reply.send(publicSettings) } }) @@ -129,7 +128,7 @@ module.exports = async function (app) { app.put('/', { preHandler: app.needsPermission('settings:edit'), schema: { - summary: 'Get platform settings', + summary: 'Update platform settings', tags: ['Platform'], body: { type: 'object' }, response: {