Skip to content

Commit

Permalink
fix: stringify json object bodies for web api request compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmpinto committed Oct 30, 2024
1 parent e6ddbd8 commit 3bb14d7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
11 changes: 1 addition & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/next-on-fleek/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fleek-platform/next-on-fleek",
"version": "1.15.0",
"version": "1.15.1",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/src/index.d.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/next-on-fleek/templates/_worker.js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ async function adaptFleekRequestToFetch(
return new Request(url, {
method: fleekRequest.method,
headers: fleekRequest.headers,
body: fleekRequest.body,
body:
typeof fleekRequest.body === 'object'
? JSON.stringify(fleekRequest.body)
: fleekRequest.body,
});
}

Expand Down

0 comments on commit 3bb14d7

Please sign in to comment.