source: pages/todo/+data.ts@ 66bf4fd

main
Last change on this file since 66bf4fd was 8ee4553, checked in by Bati <no-reply@…>, 7 months ago

scaffold Vike app with Bati

  • Property mode set to 100644
File size: 380 bytes
Line 
1// https://vike.dev/data
2
3import * as drizzleQueries from "../../database/drizzle/queries/todos";
4import type { PageContextServer } from "vike/types";
5
6export type Data = Awaited<ReturnType<typeof data>>;
7
8export async function data(_pageContext: PageContextServer) {
9 const todoItemsInitial = await drizzleQueries.getAllTodos(_pageContext.db);
10
11 return { todoItemsInitial };
12}
Note: See TracBrowser for help on using the repository browser.