Skip to content

Commit 871d6e1

Browse files
lirantalericallam
andauthored
fix: support express jsonParser middleware if used in the Express app (#309)
* fix: support express jsonParser middleware if used in the Express app * Create sixty-windows-run.md --------- Co-authored-by: Eric Allam <[email protected]>
1 parent 7daa82f commit 871d6e1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/sixty-windows-run.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/express": patch
3+
---
4+
5+
fix: support express jsonParser middleware if used in the Express app

packages/express/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ function convertToStandardRequest(req: express.Request): StandardRequest {
9797
headers,
9898
method,
9999
// @ts-ignore
100-
body: req,
100+
body: req.body ? JSON.stringify(req.body) : req,
101101
});
102102
}

0 commit comments

Comments
 (0)