We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c746b02 commit 1f48d7dCopy full SHA for 1f48d7d
lib/api/borrow.ts
@@ -66,14 +66,14 @@ export const returnBorrow = async (
66
},
67
init?: RequestInit
68
): GetBorrowResponse => {
69
+ const headers = new Headers(init?.headers)
70
+ headers.set('Content-Type', 'application/json')
71
+
72
const response = await fetch(`${BORROW_URL}/${data.id}/return`, {
73
...init,
74
method: 'POST',
75
body: JSON.stringify(data),
- headers: {
- ...init?.headers,
- 'Content-Type': 'application/json',
76
- },
+ headers,
77
})
78
if (!response.ok) {
79
const e = await response.json()
0 commit comments