Almost MVP

This commit is contained in:
2022-11-22 04:03:32 +01:00
parent ea3b7aeecf
commit dcaa052f30
19 changed files with 430 additions and 134 deletions
+12
View File
@@ -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()
},
}