diff --git a/services/web/frontend/js/features/editor-left-menu/utils/api.ts b/services/web/frontend/js/features/editor-left-menu/utils/api.ts index d4d59c32b8..c15f27ed8b 100644 --- a/services/web/frontend/js/features/editor-left-menu/utils/api.ts +++ b/services/web/frontend/js/features/editor-left-menu/utils/api.ts @@ -25,7 +25,10 @@ export type UserSettingsScope = { export function saveUserSettings(data: Partial) { postJSON('/user/settings', { - body: data, + body: { + _csrf: window.csrfToken, + ...data, + }, }) } @@ -41,6 +44,9 @@ export const saveProjectSettings = async ( data: Partial ) => { await postJSON(`/project/${projectId}/settings`, { - body: data, + body: { + _csrf: window.csrfToken, + ...data, + }, }) }