feat(api): apiClient.delete에 body 데이터 지원 추가
- DELETE 요청 시 body 데이터 전송 가능하도록 수정 - 일괄 삭제 기능 (bulk delete) 정상 작동 지원 - 영향 범위: 7개 모듈의 일괄 삭제 기능 Phase 3.2 품목관리 API 연동 완료
This commit is contained in:
@@ -146,9 +146,14 @@ export class ApiClient {
|
||||
|
||||
/**
|
||||
* DELETE 요청
|
||||
* @param endpoint API 엔드포인트
|
||||
* @param options body 데이터 (일괄 삭제 등에서 사용)
|
||||
*/
|
||||
async delete<T>(endpoint: string): Promise<T> {
|
||||
return this.request<T>(endpoint, { method: 'DELETE' });
|
||||
async delete<T>(endpoint: string, options?: { data?: unknown }): Promise<T> {
|
||||
return this.request<T>(endpoint, {
|
||||
method: 'DELETE',
|
||||
body: options?.data ? JSON.stringify(options.data) : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user