Merge master

This commit is contained in:
Linus Flood
2025-05-02 14:01:50 +02:00
116 changed files with 2531 additions and 1682 deletions

View File

@@ -100,14 +100,19 @@ export async function put(
export async function remove(
endpoint: Endpoint | `${Endpoint}/${string}`,
options: RequestOptionsWithOutBody,
options: RequestOptionsWithJSONBody,
params = {}
) {
const { body, ...requestOptions } = options
const url = new URL(env.API_BASEURL)
url.pathname = endpoint
url.search = new URLSearchParams(params).toString()
return wrappedFetch(
url,
merge.all([defaultOptions, { method: "DELETE" }, options])
merge.all([
defaultOptions,
{ body: JSON.stringify(body), method: "DELETE" },
requestOptions,
])
)
}