Almost MVP
This commit is contained in:
@@ -13,6 +13,18 @@ export const server = {
|
||||
body: JSON.stringify(body),
|
||||
})
|
||||
|
||||
return await res.json()
|
||||
},
|
||||
async patch<T>(url: string, body?: T) {
|
||||
const res = await fetch(url, {
|
||||
method: 'PATCH',
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify(body),
|
||||
})
|
||||
|
||||
return await res.json()
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user