From de41b07228ab74967abb1150c759c4c2e825d044 Mon Sep 17 00:00:00 2001 From: Naz Date: Wed, 19 Apr 2023 16:01:40 +0200 Subject: [PATCH] Exposed announcement settings in Content API refs https://github.com/TryGhost/Team/issues/3011 - Allows to read following settings fields: - announcement - alias to announcement_content - announcement_background --- ghost/core/core/shared/settings-cache/public.js | 4 +++- .../test/e2e-api/content/__snapshots__/settings.test.js.snap | 2 ++ .../test/e2e-api/shared/__snapshots__/version.test.js.snap | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ghost/core/core/shared/settings-cache/public.js b/ghost/core/core/shared/settings-cache/public.js index 2098bb4ac9..8f432024a9 100644 --- a/ghost/core/core/shared/settings-cache/public.js +++ b/ghost/core/core/shared/settings-cache/public.js @@ -39,5 +39,7 @@ module.exports = { portal_plans: 'portal_plans', portal_name: 'portal_name', portal_button: 'portal_button', - comments_enabled: 'comments_enabled' + comments_enabled: 'comments_enabled', + announcement: 'announcement_content', + announcement_background: 'announcement_background' }; diff --git a/ghost/core/test/e2e-api/content/__snapshots__/settings.test.js.snap b/ghost/core/test/e2e-api/content/__snapshots__/settings.test.js.snap index 6a14321368..44b45e78ea 100644 --- a/ghost/core/test/e2e-api/content/__snapshots__/settings.test.js.snap +++ b/ghost/core/test/e2e-api/content/__snapshots__/settings.test.js.snap @@ -5,6 +5,8 @@ Object { "meta": Object {}, "settings": Object { "accent_color": "#FF1A75", + "announcement": null, + "announcement_background": "dark", "codeinjection_foot": null, "codeinjection_head": null, "comments_enabled": "off", diff --git a/ghost/core/test/e2e-api/shared/__snapshots__/version.test.js.snap b/ghost/core/test/e2e-api/shared/__snapshots__/version.test.js.snap index b4acfca7d9..82b88656ad 100644 --- a/ghost/core/test/e2e-api/shared/__snapshots__/version.test.js.snap +++ b/ghost/core/test/e2e-api/shared/__snapshots__/version.test.js.snap @@ -1339,6 +1339,8 @@ Object { "meta": Object {}, "settings": Object { "accent_color": "#FF1A75", + "announcement": null, + "announcement_background": "dark", "codeinjection_foot": null, "codeinjection_head": null, "comments_enabled": "off", @@ -1435,6 +1437,8 @@ Object { "meta": Object {}, "settings": Object { "accent_color": "#FF1A75", + "announcement": null, + "announcement_background": "dark", "codeinjection_foot": null, "codeinjection_head": null, "comments_enabled": "off",