Skip to content

Commit b1d5c59

Browse files
docs(fix): add missing ctx.db (#4768)
Signed-off-by: Micha Huhn <michahuhndev@gmx.de> Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
1 parent 7143ed9 commit b1d5c59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/00200-core-concepts/00200-functions/00400-procedures.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export default spacetimedb;
145145
146146
export const insert_a_value = spacetimedb.procedure({ a: t.u32(), b: t.u32() }, t.unit(), (ctx, { a, b }) => {
147147
ctx.withTx(ctx => {
148-
ctx.myTable.insert({ a, b });
148+
ctx.db.myTable.insert({ a, b });
149149
});
150150
return {};
151151
})
@@ -332,7 +332,7 @@ export const maybe_insert_a_value = spacetimedb.procedure({ a: t.u32(), b: t.str
332332
if (a < 10) {
333333
throw new SenderError("a is less than 10!");
334334
}
335-
ctx.myTable.insert({ a, b });
335+
ctx.db.myTable.insert({ a, b });
336336
});
337337
})
338338
```

0 commit comments

Comments
 (0)