diff --git a/server/src/trpc.ts b/server/src/trpc.ts index 8f2764aa6..ef9e8a20a 100644 --- a/server/src/trpc.ts +++ b/server/src/trpc.ts @@ -1,5 +1,5 @@ import { TRPCError, initTRPC } from '@trpc/server'; -import * as trpcExpress from '@trpc/server/adapters/express'; +import type * as trpcExpress from '@trpc/server/adapters/express'; import { getUserByTokenService } from './services/user/getUserByToken'; const t = initTRPC.create(); @@ -55,7 +55,7 @@ export const publicProcedure = t.procedure; /** * Authentication middleware */ -const isAuthenticated = t.middleware((opts) => { +const isAuthenticated = t.middleware(async (opts) => { const { ctx, next } = opts; if (!ctx.user) {