Add _csrf to request body

GitOrigin-RevId: 87b5a7299fbb795618143421df79375b41f8f921
This commit is contained in:
M Fahru
2022-12-27 13:04:32 -07:00
committed by Copybot
parent 0d5f5ed59f
commit b1068e5dec
@@ -25,7 +25,10 @@ export type UserSettingsScope = {
export function saveUserSettings(data: Partial<UserSettingsScope>) {
postJSON('/user/settings', {
body: data,
body: {
_csrf: window.csrfToken,
...data,
},
})
}
@@ -41,6 +44,9 @@ export const saveProjectSettings = async (
data: Partial<ProjectSettingsScope>
) => {
await postJSON<never>(`/project/${projectId}/settings`, {
body: data,
body: {
_csrf: window.csrfToken,
...data,
},
})
}