260909_01_ENH: patchForm 추가
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@kri/common",
|
"name": "@kri/common",
|
||||||
"version": "0.18.3",
|
"version": "0.18.4",
|
||||||
"description": "KRI 프런트엔드 공통 유틸리티",
|
"description": "KRI 프런트엔드 공통 유틸리티",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"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 {
|
return {
|
||||||
request,
|
request,
|
||||||
get,
|
get,
|
||||||
@@ -760,6 +772,7 @@ export const createHttpClient = (
|
|||||||
del,
|
del,
|
||||||
postForm,
|
postForm,
|
||||||
putForm,
|
putForm,
|
||||||
|
patchForm,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user