From a03f1dc2ac25579df30e8cb59d2703110c3e564d Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Wed, 13 Mar 2024 22:37:41 +0000 Subject: lint: Lint and format the entire repo with the new configs --- apps/web/app/api/trpc/[trpc]/route.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'apps/web/app/api') diff --git a/apps/web/app/api/trpc/[trpc]/route.ts b/apps/web/app/api/trpc/[trpc]/route.ts index 02ca966d..23df286f 100644 --- a/apps/web/app/api/trpc/[trpc]/route.ts +++ b/apps/web/app/api/trpc/[trpc]/route.ts @@ -1,8 +1,9 @@ -import { fetchRequestHandler } from "@trpc/server/adapters/fetch"; -import { appRouter } from "@hoarder/trpc/routers/_app"; import { createContext } from "@/server/api/client"; -import { authenticateApiKey } from "@hoarder/trpc/auth"; +import { fetchRequestHandler } from "@trpc/server/adapters/fetch"; + import { db } from "@hoarder/db"; +import { authenticateApiKey } from "@hoarder/trpc/auth"; +import { appRouter } from "@hoarder/trpc/routers/_app"; const handler = (req: Request) => fetchRequestHandler({ @@ -21,7 +22,7 @@ const handler = (req: Request) => // Check if the request has an Authorization token, if it does, assume that API key authentication is requested. const authorizationHeader = opts.req.headers.get("Authorization"); if (authorizationHeader && authorizationHeader.startsWith("Bearer ")) { - const token = authorizationHeader.split(" ")[1]!; + const token = authorizationHeader.split(" ")[1]; try { const user = await authenticateApiKey(token); return { user, db }; -- cgit v1.2.3-70-g09d2