source: pages/todo/TodoList.telefunc.ts@ 8ee4553

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
RevLine 
[8ee4553]1// We use Telefunc (https://telefunc.com) for data mutations.
2
3import * as drizzleQueries from "../../database/drizzle/queries/todos";
4import { getContext } from "telefunc";
5
6export 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.