Skip to content

Commit

Permalink
Fix workflow trigger params serialization (#7075)
Browse files Browse the repository at this point in the history
* feat: change trigger command to comply with new endpoint

* fix: fix workflow trigger command param serialization
  • Loading branch information
LuisDuarte1 authored Oct 23, 2024
1 parent 8dc2b7d commit 80e5bc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/tasty-kangaroos-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

Fix params serialization when send the trigger workflow API

Previously, wrangler did not parse the params sending it as a string to workflow's services.
2 changes: 1 addition & 1 deletion packages/wrangler/src/workflows/commands/trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ defineCommand({
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
instance_id: args.id,
params: args.params.length != 0 ? args.params : undefined,
params: args.params.length != 0 ? JSON.parse(args.params) : undefined,
}),
}
);
Expand Down

0 comments on commit 80e5bc6

Please sign in to comment.