Initial commit

This commit is contained in:
2026-02-10 01:25:57 +01:00
commit 7020a6a339
53 changed files with 1503 additions and 0 deletions

19
packages/db/src/posts.ts Normal file
View File

@@ -0,0 +1,19 @@
import { upsertPostSchema } from "@cms/content"
import { db } from "./client"
export async function listPosts() {
return db.post.findMany({
orderBy: {
updatedAt: "desc",
},
})
}
export async function createPost(input: unknown) {
const payload = upsertPostSchema.parse(input)
return db.post.create({
data: payload,
})
}