From 3036608478289361f61dd6bf36374b32b0849c6a Mon Sep 17 00:00:00 2001 From: Jesse Wynants Date: Fri, 13 Feb 2026 13:34:00 +0100 Subject: [PATCH] Add update() method to NewsroomThemes client Sends PATCH (instead of POST like apply()) to save theme settings without activating the theme. --- src/endpoints/NewsroomThemes/Client.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/endpoints/NewsroomThemes/Client.ts b/src/endpoints/NewsroomThemes/Client.ts index c22725aa..b7cab4bc 100644 --- a/src/endpoints/NewsroomThemes/Client.ts +++ b/src/endpoints/NewsroomThemes/Client.ts @@ -41,10 +41,23 @@ export function createClient(api: DeferredJobsApiClient) { return themes; } + async function update( + newsroomId: NewsroomId, + themeId: NewsroomThemeId, + settings: NewsroomThemePreset['settings'], + ): Promise { + const url = routing.newsroomThemesUrl.replace(':newsroom_id', String(newsroomId)); + const { theme } = await api.patch<{ theme: NewsroomThemePreset }>(`${url}/${themeId}`, { + payload: settings, + }); + return theme; + } + return { apply, get, getActive, list, + update, }; }