mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Remove _csrf in request body since fetchJSON
already have X-Csrf-Token
set in request header
GitOrigin-RevId: 9dd2389c47ce3537fc4bb22bd8b6b0b83862c5f4
This commit is contained in:
parent
4548f504f7
commit
03e5614969
1 changed files with 2 additions and 8 deletions
|
@ -38,10 +38,7 @@ type SaveUserSettings = Partial<
|
||||||
|
|
||||||
export function saveUserSettings(data: SaveUserSettings) {
|
export function saveUserSettings(data: SaveUserSettings) {
|
||||||
postJSON('/user/settings', {
|
postJSON('/user/settings', {
|
||||||
body: {
|
body: data,
|
||||||
_csrf: window.csrfToken,
|
|
||||||
...data,
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,9 +51,6 @@ export const saveProjectSettings = async ({
|
||||||
...data
|
...data
|
||||||
}: SaveProjectSettings) => {
|
}: SaveProjectSettings) => {
|
||||||
await postJSON<never>(`/project/${projectId}/settings`, {
|
await postJSON<never>(`/project/${projectId}/settings`, {
|
||||||
body: {
|
body: data,
|
||||||
_csrf: window.csrfToken,
|
|
||||||
...data,
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue