Skip to content

Commit 4e7f215

Browse files
Fix code example (#19107)
1 parent e2ca694 commit 4e7f215

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/docs/workflows/examples/backup-d1.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class backupWorkflow extends WorkflowEntrypoint<Env, Params> {
6363
headers.append("Content-Type", "application/json");
6464
headers.append("Authorization", `Bearer ${this.env.D1_REST_API_TOKEN}`);
6565

66-
const bookmark = step.do(`Starting backup for ${databaseId}`, async () => {
66+
const bookmark = await step.do(`Starting backup for ${databaseId}`, async () => {
6767
const payload = { output_format: "polling" };
6868

6969
const res = await fetch(url, { method, headers, body: JSON.stringify(payload) });
@@ -75,7 +75,7 @@ export class backupWorkflow extends WorkflowEntrypoint<Env, Params> {
7575
return result.at_bookmark;
7676
});
7777

78-
step.do("Check backup status and store it on R2", async () => {
78+
await step.do("Check backup status and store it on R2", async () => {
7979
const payload = { current_bookmark: bookmark };
8080

8181
const res = await fetch(url, { method, headers, body: JSON.stringify(payload) });

0 commit comments

Comments
 (0)