From 117d8b99dfda9697199113c15a47fecf16fc1bbf Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Sun, 8 Feb 2026 21:19:55 -0500 Subject: [PATCH] fix: update request body handling in POST and PUT methods to accept raw data --- src/utils/ApiClient.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/ApiClient.js b/src/utils/ApiClient.js index d001063..aaa588c 100644 --- a/src/utils/ApiClient.js +++ b/src/utils/ApiClient.js @@ -234,10 +234,11 @@ class ApiClient { if (!options.headers['Content-Type']) { options.headers['Content-Type'] = 'application/json' } + return this.request(endpoint, { - ...options, + options: { ...options }, method: 'POST', - body: data ? JSON.stringify(data) : undefined, + body: data ? data : undefined, }) } @@ -249,7 +250,7 @@ class ApiClient { return this.request(endpoint, { ...options, method: 'PUT', - body: data ? JSON.stringify(data) : undefined, + body: data ? data : undefined, }) }