Skip to content

Commit 80e5bc6

Browse files
authored
Fix workflow trigger params serialization (#7075)
* feat: change trigger command to comply with new endpoint * fix: fix workflow trigger command param serialization
1 parent 8dc2b7d commit 80e5bc6

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/tasty-kangaroos-bake.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
Fix params serialization when send the trigger workflow API
6+
7+
Previously, wrangler did not parse the params sending it as a string to workflow's services.

packages/wrangler/src/workflows/commands/trigger.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ defineCommand({
5454
headers: { "Content-Type": "application/json" },
5555
body: JSON.stringify({
5656
instance_id: args.id,
57-
params: args.params.length != 0 ? args.params : undefined,
57+
params: args.params.length != 0 ? JSON.parse(args.params) : undefined,
5858
}),
5959
}
6060
);

0 commit comments

Comments
 (0)