Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default spacetimedb;

export const insert_a_value = spacetimedb.procedure({ a: t.u32(), b: t.u32() }, t.unit(), (ctx, { a, b }) => {
ctx.withTx(ctx => {
ctx.myTable.insert({ a, b });
ctx.db.myTable.insert({ a, b });
});
return {};
})
Expand Down Expand Up @@ -332,7 +332,7 @@ export const maybe_insert_a_value = spacetimedb.procedure({ a: t.u32(), b: t.str
if (a < 10) {
throw new SenderError("a is less than 10!");
}
ctx.myTable.insert({ a, b });
ctx.db.myTable.insert({ a, b });
});
})
```
Expand Down