Files
veridian/server/api/topics/index.get.ts
T
2026-01-11 05:04:29 -06:00

11 lines
277 B
TypeScript

import { topics } from "~~/db/schema";
import { protectRoute } from "~~/server/utils/auth";
export default defineEventHandler(async (event) => {
await protectRoute(event);
const db = useDrizzle();
const rows = await db.select().from(topics);
return rows;
});