refactor: 抽取 UI 组件、改进错误页面、统一导入路径并简化数据库接口

This commit is contained in:
2026-04-02 00:13:43 +08:00
parent 4ec4576fc5
commit c67e773086
10 changed files with 197 additions and 136 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
import { ORPCError } from '@orpc/server'
import { eq } from 'drizzle-orm'
import { db } from '@/server/api/middlewares'
import { os } from '@/server/api/server'
import { todoTable } from '@/server/db/schema'
import { db } from '../middlewares'
import { os } from '../server'
export const list = os.todo.list.use(db).handler(async ({ context }) => {
const todos = await context.db.query.todoTable.findMany({