Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
kae_mihara 2026-07-05 07:55:59 +09:00 committed by GitHub
parent ffd6354e88
commit bd42ff8a52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -168,8 +168,8 @@ export const listProductBatches = (productId: string) =>
export const createProductBatch = (productId: string, batch: ProductBatchInput) => export const createProductBatch = (productId: string, batch: ProductBatchInput) =>
request<ApiResponse<{ id: string }>>(`/api/v1/inventory/products/${productId}/batches`, { method: 'POST', data: { batch } }); request<ApiResponse<{ id: string }>>(`/api/v1/inventory/products/${productId}/batches`, { method: 'POST', data: { batch } });
export const updateProductBatch = (productId: string, batchId: string, batch: ProductBatchInput & { status?: number }) => export const updateProductBatch = (productId: string, batchId: string, batch: ProductBatchInput, status?: number) =>
request<ApiResponse>(`/api/v1/inventory/products/${productId}/batches/${batchId}`, { method: 'PUT', data: { batch, status: batch.status ?? 1 } }); request<ApiResponse>(`/api/v1/inventory/products/${productId}/batches/${batchId}`, { method: 'PUT', data: status === undefined ? { batch } : { batch, status } });
export const deleteProductBatch = (productId: string, batchId: string) => export const deleteProductBatch = (productId: string, batchId: string) =>
request<ApiResponse>(`/api/v1/inventory/products/${productId}/batches/${batchId}`, { method: 'DELETE' }); request<ApiResponse>(`/api/v1/inventory/products/${productId}/batches/${batchId}`, { method: 'DELETE' });