Skip to content
Source
Sign inSign up
fuko/trytanstackdb.com
Open History to see the last commit

api.boards.ts

11 lines283 Bytes

1import { db } from "@/db";
2import { boardsTable } from "@/db/schema";
3import { type APIRouteHandler, json } from "./helpers";
4​
5export default {
6 GET: async () => {
7 const results = await db.select().from(boardsTable);
8​
9 return json(results);
10 },
11} satisfies APIRouteHandler;