From b9af603cb71dc294c1995958e53600b486288394 Mon Sep 17 00:00:00 2001 From: kent Date: Fri, 9 Jan 2026 22:07:30 +0900 Subject: [PATCH] =?UTF-8?q?feat(api):=20apiClient.delete=EC=97=90=20body?= =?UTF-8?q?=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=A7=80=EC=9B=90=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - DELETE 요청 시 body 데이터 전송 가능하도록 수정 - 일괄 삭제 기능 (bulk delete) 정상 작동 지원 - 영향 범위: 7개 모듈의 일괄 삭제 기능 Phase 3.2 품목관리 API 연동 완료 --- src/lib/api/client.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/api/client.ts b/src/lib/api/client.ts index 2bbcf814..f6b65adc 100644 --- a/src/lib/api/client.ts +++ b/src/lib/api/client.ts @@ -146,9 +146,14 @@ export class ApiClient { /** * DELETE 요청 + * @param endpoint API 엔드포인트 + * @param options body 데이터 (일괄 삭제 등에서 사용) */ - async delete(endpoint: string): Promise { - return this.request(endpoint, { method: 'DELETE' }); + async delete(endpoint: string, options?: { data?: unknown }): Promise { + return this.request(endpoint, { + method: 'DELETE', + body: options?.data ? JSON.stringify(options.data) : undefined, + }); } /**