initial commit
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
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;
|
||||
});
|
||||
Reference in New Issue
Block a user