This commit is contained in:
2026-01-21 16:00:28 +08:00
parent 76796613b4
commit f5fd28621e
13 changed files with 23 additions and 4 deletions

19
apps/server/biome.json Normal file
View File

@@ -0,0 +1,19 @@
{
"$schema": "../../node_modules/@biomejs/biome/configuration_schema.json",
"extends": "//",
"files": {
"includes": ["**", "!**/routeTree.gen.ts"]
},
"overrides": [
{
"includes": ["**"],
"linter": {
"rules": {
"correctness": {
"useHookAtTopLevel": "off"
}
}
}
}
]
}

View File

@@ -1,8 +1,8 @@
import { ORPCError } from '@orpc/server' import { ORPCError } from '@orpc/server'
import { eq } from 'drizzle-orm' import { eq } from 'drizzle-orm'
import { dbProvider } from '@/api/middlewares'
import { os } from '@/api/server'
import { todoTable } from '@/db/schema' import { todoTable } from '@/db/schema'
import { dbProvider } from '@/orpc/middlewares'
import { os } from '@/orpc/server'
export const list = os.todo.list export const list = os.todo.list
.use(dbProvider) .use(dbProvider)

View File

@@ -2,7 +2,7 @@ import { ORPCError, onError, ValidationError } from '@orpc/server'
import { RPCHandler } from '@orpc/server/fetch' import { RPCHandler } from '@orpc/server/fetch'
import { createFileRoute } from '@tanstack/react-router' import { createFileRoute } from '@tanstack/react-router'
import { z } from 'zod' import { z } from 'zod'
import { router } from '@/orpc/router' import { router } from '@/api/router'
const handler = new RPCHandler(router, { const handler = new RPCHandler(router, {
interceptors: [ interceptors: [

View File

@@ -4,7 +4,7 @@ import { isTauri } from '@tauri-apps/api/core'
import { getCurrentWindow } from '@tauri-apps/api/window' import { getCurrentWindow } from '@tauri-apps/api/window'
import type { ChangeEventHandler, FormEventHandler } from 'react' import type { ChangeEventHandler, FormEventHandler } from 'react'
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { orpc } from '@/orpc' import { orpc } from '@/api'
export const Route = createFileRoute('/')({ export const Route = createFileRoute('/')({
component: Todos, component: Todos,