Merge master
This commit is contained in:
@@ -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,
|
||||
])
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user