mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
fix tsc error by re-creating request body object instead of directly assigning it from function argument
GitOrigin-RevId: b17697c7b52c991a06efcbffa0227b6021c5bc8d
This commit is contained in:
@@ -38,7 +38,9 @@ type SaveUserSettings = Partial<
|
||||
|
||||
export function saveUserSettings(data: SaveUserSettings) {
|
||||
postJSON('/user/settings', {
|
||||
body: data,
|
||||
body: {
|
||||
...data,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -51,6 +53,8 @@ export const saveProjectSettings = async ({
|
||||
...data
|
||||
}: SaveProjectSettings) => {
|
||||
await postJSON<never>(`/project/${projectId}/settings`, {
|
||||
body: data,
|
||||
body: {
|
||||
...data,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user