260909_01_ENH: patchForm 추가
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kri/common",
|
||||
"version": "0.18.3",
|
||||
"version": "0.18.4",
|
||||
"description": "KRI 프런트엔드 공통 유틸리티",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
@@ -751,6 +751,18 @@ export const createHttpClient = (
|
||||
});
|
||||
};
|
||||
|
||||
const patchForm = <T = unknown>(
|
||||
path: string,
|
||||
form: FormData,
|
||||
requestOptions?: RequestOptionsWithoutBody,
|
||||
): Promise<T> => {
|
||||
return request<T>(path, {
|
||||
...(requestOptions ?? {}),
|
||||
method: "PATCH",
|
||||
form,
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
request,
|
||||
get,
|
||||
@@ -760,6 +772,7 @@ export const createHttpClient = (
|
||||
del,
|
||||
postForm,
|
||||
putForm,
|
||||
patchForm,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user