diff options
Diffstat (limited to 'apps/cli/lib/trpc.ts')
| -rw-r--r-- | apps/cli/lib/trpc.ts | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/apps/cli/lib/trpc.ts b/apps/cli/lib/trpc.ts deleted file mode 100644 index 6f0dccfe..00000000 --- a/apps/cli/lib/trpc.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { createTRPCClient, httpBatchLink } from "@trpc/client"; -import superjson from "superjson"; - -import type { AppRouter } from "@hoarder/trpc/routers/_app"; - -import { getGlobalOptions } from "./globals"; - -export function getAPIClient() { - const globals = getGlobalOptions(); - return createTRPCClient<AppRouter>({ - links: [ - httpBatchLink({ - url: `${globals.serverAddr}/api/trpc`, - transformer: superjson, - headers() { - return { - authorization: `Bearer ${globals.apiKey}`, - }; - }, - }), - ], - }); -} |
