From dbd8a30971aec5103e34e13386c5b7b68539bbf0 Mon Sep 17 00:00:00 2001 From: timthedev07 Date: Fri, 29 Dec 2023 04:01:47 +0100 Subject: [PATCH] fix prod error --- app/src/app/api/trpc/[trpc]/route.ts | 2 +- app/src/trpc/Provider.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/app/api/trpc/[trpc]/route.ts b/app/src/app/api/trpc/[trpc]/route.ts index c776a188..d4ef451b 100644 --- a/app/src/app/api/trpc/[trpc]/route.ts +++ b/app/src/app/api/trpc/[trpc]/route.ts @@ -9,4 +9,4 @@ const handler = (req: Request) => createContext: () => ({}), }); -export { handler as GET, handler as POST }; +export { handler as GET, handler as OPTIONS, handler as POST }; diff --git a/app/src/trpc/Provider.tsx b/app/src/trpc/Provider.tsx index d4d3d5fb..91c8c47f 100644 --- a/app/src/trpc/Provider.tsx +++ b/app/src/trpc/Provider.tsx @@ -14,7 +14,7 @@ export const TRPCProvider = ({ children }: { children: React.ReactNode }) => { ); const url = process.env.NEXT_PUBLIC_VERCEL_URL - ? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}` + ? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}/api/trpc/` : "http://localhost:3000/api/trpc/"; const [trpcClient] = useState(() =>