move to drizzle instead of prisma
This commit is contained in:
8
src/pages/api/posts.ts
Normal file
8
src/pages/api/posts.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import { listRecentPosts } from "~/server/posts";
|
||||
|
||||
export default async function handler(_request: NextApiRequest, response: NextApiResponse) {
|
||||
const posts = await listRecentPosts();
|
||||
|
||||
response.status(200).json({ posts });
|
||||
}
|
||||
Reference in New Issue
Block a user