feat: 初始化慧遇书院官网一期

This commit is contained in:
2026-08-12 18:01:17 +08:00
commit 5d31ee5743
101 changed files with 17259 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
import { useDatabase } from '../../../utils/db'
export default defineEventHandler(async (event) => {
await requireAdmin(event)
const rows = useDatabase().prepare(`
SELECT version, action, comment, created_at AS createdAt
FROM revisions WHERE entity_type = 'site_document' AND entity_key = 'website'
ORDER BY version DESC LIMIT 20
`).all() as Array<{ version: number; action: string; comment: string | null; createdAt: string }>
return { data: rows }
})