mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-07 16:19:02 +02:00
Add _csrf to request body
GitOrigin-RevId: 87b5a7299fbb795618143421df79375b41f8f921
This commit is contained in:
@@ -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,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user