From bd42ff8a5274614805f50f349c527f44254079d4 Mon Sep 17 00:00:00 2001 From: kae_mihara Date: Sun, 5 Jul 2026 07:55:59 +0900 Subject: [PATCH] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/services/api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/api.ts b/src/services/api.ts index 77494c2..316d5e8 100644 --- a/src/services/api.ts +++ b/src/services/api.ts @@ -168,8 +168,8 @@ export const listProductBatches = (productId: string) => export const createProductBatch = (productId: string, batch: ProductBatchInput) => request>(`/api/v1/inventory/products/${productId}/batches`, { method: 'POST', data: { batch } }); -export const updateProductBatch = (productId: string, batchId: string, batch: ProductBatchInput & { status?: number }) => - request(`/api/v1/inventory/products/${productId}/batches/${batchId}`, { method: 'PUT', data: { batch, status: batch.status ?? 1 } }); +export const updateProductBatch = (productId: string, batchId: string, batch: ProductBatchInput, status?: number) => + request(`/api/v1/inventory/products/${productId}/batches/${batchId}`, { method: 'PUT', data: status === undefined ? { batch } : { batch, status } }); export const deleteProductBatch = (productId: string, batchId: string) => request(`/api/v1/inventory/products/${productId}/batches/${batchId}`, { method: 'DELETE' });