Skip to content

Commit 1f48d7d

Browse files
committed
fix: return borrow server action api call
1 parent c746b02 commit 1f48d7d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/api/borrow.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ export const returnBorrow = async (
6666
},
6767
init?: RequestInit
6868
): GetBorrowResponse => {
69+
const headers = new Headers(init?.headers)
70+
headers.set('Content-Type', 'application/json')
71+
6972
const response = await fetch(`${BORROW_URL}/${data.id}/return`, {
7073
...init,
7174
method: 'POST',
7275
body: JSON.stringify(data),
73-
headers: {
74-
...init?.headers,
75-
'Content-Type': 'application/json',
76-
},
76+
headers,
7777
})
7878
if (!response.ok) {
7979
const e = await response.json()

0 commit comments

Comments
 (0)