mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05: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:
parent
b2cf833e9d
commit
4444377b11
1 changed files with 6 additions and 2 deletions
|
@ -38,7 +38,9 @@ type SaveUserSettings = Partial<
|
||||||
|
|
||||||
export function saveUserSettings(data: SaveUserSettings) {
|
export function saveUserSettings(data: SaveUserSettings) {
|
||||||
postJSON('/user/settings', {
|
postJSON('/user/settings', {
|
||||||
body: data,
|
body: {
|
||||||
|
...data,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,6 +53,8 @@ export const saveProjectSettings = async ({
|
||||||
...data
|
...data
|
||||||
}: SaveProjectSettings) => {
|
}: SaveProjectSettings) => {
|
||||||
await postJSON<never>(`/project/${projectId}/settings`, {
|
await postJSON<never>(`/project/${projectId}/settings`, {
|
||||||
body: data,
|
body: {
|
||||||
|
...data,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue