File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
src/content/docs/workflows/build Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -29,23 +29,23 @@ Store state durably by returning it from your `step.do` callbacks.
2929
3030``` ts
3131export default {
32- async fetch(req : Request , env : Env ) {
33- let someEvent = { url: req .url , createdTimestamp: Date .now () }
34- // Trigger our Workflow
35- // Pass our event as the second parameter to the `create` method
36- // on our Workflow binding.
37- let instance = await env .MYWORKFLOW .create ({
32+ async fetch(req : Request , env : Env ) {
33+ let someEvent = { url: req .url , createdTimestamp: Date .now () }
34+ // Trigger our Workflow
35+ // Pass our event as the second parameter to the `create` method
36+ // on our Workflow binding.
37+ let instance = await env .MYWORKFLOW .create ({
3838 id: await crypto .randomUUID (),
3939 params: someEvent
4040 });
4141
42- return Response .json ({
43- id: instance .id ,
44- details: await instance .status (),
45- });
42+ return Response .json ({
43+ id: instance .id ,
44+ details: await instance .status (),
45+ });
4646
47- return Response .json ({ result });
48- },
47+ return Response .json ({ result });
48+ },
4949};
5050```
5151
You can’t perform that action at this time.
0 commit comments