Remove _csrf in request body since fetchJSON already have X-Csrf-Token set in request header

GitOrigin-RevId: 9dd2389c47ce3537fc4bb22bd8b6b0b83862c5f4
This commit is contained in:
M Fahru 2023-01-03 15:41:27 -07:00 committed by Copybot
parent 4548f504f7
commit 03e5614969

View file

@ -38,10 +38,7 @@ type SaveUserSettings = Partial<
export function saveUserSettings(data: SaveUserSettings) {
postJSON('/user/settings', {
body: {
_csrf: window.csrfToken,
...data,
},
body: data,
})
}
@ -54,9 +51,6 @@ export const saveProjectSettings = async ({
...data
}: SaveProjectSettings) => {
await postJSON<never>(`/project/${projectId}/settings`, {
body: {
_csrf: window.csrfToken,
...data,
},
body: data,
})
}