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:
380 bytes
|
| Line | |
|---|
| 1 | // https://vike.dev/data
|
|---|
| 2 |
|
|---|
| 3 | import * as drizzleQueries from "../../database/drizzle/queries/todos";
|
|---|
| 4 | import type { PageContextServer } from "vike/types";
|
|---|
| 5 |
|
|---|
| 6 | export type Data = Awaited<ReturnType<typeof data>>;
|
|---|
| 7 |
|
|---|
| 8 | export 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.