diff --git a/apps/server/src/api/client.ts b/apps/server/src/api/client.ts index b5d0e8f..d011a07 100644 --- a/apps/server/src/api/client.ts +++ b/apps/server/src/api/client.ts @@ -4,7 +4,7 @@ import { createRouterClient } from '@orpc/server' import { createTanstackQueryUtils } from '@orpc/tanstack-query' import { createIsomorphicFn } from '@tanstack/react-start' import { getRequestHeaders } from '@tanstack/react-start/server' -import { router } from './router' +import { router } from './routers' import type { RouterClient } from './types' const getORPCClient = createIsomorphicFn() diff --git a/apps/server/src/api/router.ts b/apps/server/src/api/router.ts deleted file mode 100644 index 603f313..0000000 --- a/apps/server/src/api/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as todo from './handlers/todo' -import { os } from './server' - -export const router = os.router({ - todo, -}) diff --git a/apps/server/src/api/routers/index.ts b/apps/server/src/api/routers/index.ts new file mode 100644 index 0000000..6c8f8aa --- /dev/null +++ b/apps/server/src/api/routers/index.ts @@ -0,0 +1,6 @@ +import { os } from '../server' +import * as todo from './todo' + +export const router = os.router({ + todo, +}) diff --git a/apps/server/src/api/handlers/todo.ts b/apps/server/src/api/routers/todo.ts similarity index 100% rename from apps/server/src/api/handlers/todo.ts rename to apps/server/src/api/routers/todo.ts diff --git a/apps/server/src/routes/api/rpc.$.ts b/apps/server/src/routes/api/rpc.$.ts index 5fe559e..a13e3b8 100644 --- a/apps/server/src/routes/api/rpc.$.ts +++ b/apps/server/src/routes/api/rpc.$.ts @@ -2,7 +2,7 @@ import { ORPCError, onError, ValidationError } from '@orpc/server' import { RPCHandler } from '@orpc/server/fetch' import { createFileRoute } from '@tanstack/react-router' import { z } from 'zod' -import { router } from '@/api/router' +import { router } from '@/api/routers' const handler = new RPCHandler(router, { interceptors: [