From f4639752ec6c7cf96963fcc69fe54775dee1d79e Mon Sep 17 00:00:00 2001 From: istarkov Date: Wed, 8 May 2024 22:31:48 +0300 Subject: [PATCH] Do not check user authenticated on trpc --- apps/builder/app/routes/trpc.$.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/apps/builder/app/routes/trpc.$.ts b/apps/builder/app/routes/trpc.$.ts index b57954d08ad4..ad633a3a220f 100644 --- a/apps/builder/app/routes/trpc.$.ts +++ b/apps/builder/app/routes/trpc.$.ts @@ -1,17 +1,10 @@ // eslint-disable-next-line import/no-internal-modules import { fetchRequestHandler } from "@trpc/server/adapters/fetch"; import type { ActionFunctionArgs } from "@remix-run/server-runtime"; -import { findAuthenticatedUser } from "~/services/auth.server"; import { createContext } from "~/shared/context.server"; import { appRouter } from "~/services/trcp-router.server"; export const action = async ({ request }: ActionFunctionArgs) => { - const authenticatedUser = await findAuthenticatedUser(request); - - if (authenticatedUser === null) { - throw new Error("Not authenticated"); - } - // https://trpc.io/docs/server/adapters/fetch const response = await fetchRequestHandler({ req: request,