From ea39803210019aaa530752039490eb031067aebe Mon Sep 17 00:00:00 2001 From: Al Caprar <11180418+alcaprar@users.noreply.github.com> Date: Sat, 3 Aug 2024 12:40:49 +0200 Subject: [PATCH] fix: remove JSON.stringify from sales.addProduct --- frontend/plugins/api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/plugins/api.ts b/frontend/plugins/api.ts index b570161..532621c 100644 --- a/frontend/plugins/api.ts +++ b/frontend/plugins/api.ts @@ -626,11 +626,11 @@ class SalesClient { logger.debug(`[ApiClient][Sales][addProduct] saleId ${saleId} productId ${productId}`) const url = `${this.baseUrl}/sales/${saleId}/products`; try { - let body = JSON.stringify({ + let body = { data: { productId: productId }, - }); + }; logger.debug("[ApiClient][Sales][addProduct] body", body) let response = await fetchAuthenticated('POST', url, body); if (response.status == 404) {