main
|
Last change
on this file since 8ee4553 was 8ee4553, checked in by Bati <no-reply@…>, 7 months ago |
|
scaffold Vike app with Bati
|
-
Property mode
set to
100644
|
|
File size:
324 bytes
|
| Rev | Line | |
|---|
| [8ee4553] | 1 | // We use Telefunc (https://telefunc.com) for data mutations.
|
|---|
| 2 |
|
|---|
| 3 | import * as drizzleQueries from "../../database/drizzle/queries/todos";
|
|---|
| 4 | import { getContext } from "telefunc";
|
|---|
| 5 |
|
|---|
| 6 | export async function onNewTodo({ text }: { text: string }) {
|
|---|
| 7 | const context = getContext();
|
|---|
| 8 | await drizzleQueries.insertTodo(context.db, text);
|
|---|
| 9 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.