Skip to content

Commit

Permalink
feat: change trigger command to comply with new endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisDuarte1 committed Oct 23, 2024
1 parent 760e43f commit e32b7af
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/wrangler/src/workflows/commands/trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ defineCommand({
type: "string",
default: "",
},
id: {
describe:
"Custom instance ID, if not provided it will default to a random UUIDv4",
type: "string",
default: undefined,
},
},
positionalArgs: ["name", "params"],

Expand All @@ -45,7 +51,11 @@ defineCommand({
`/accounts/${accountId}/workflows/${args.name}/instances`,
{
method: "POST",
body: args.params.length != 0 ? args.params : undefined,
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
instance_id: args.id,
params: args.params.length != 0 ? args.params : undefined,
}),
}
);

Expand Down

0 comments on commit e32b7af

Please sign in to comment.