diff options
| author | MohamedBassem <me@mbassem.com> | 2024-03-13 21:43:44 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2024-03-14 16:40:45 +0000 |
| commit | 04572a8e5081b1e4871e273cde9dbaaa44c52fe0 (patch) | |
| tree | 8e993acb732a50d1306d4d6953df96c165c57f57 /apps/web/app/api | |
| parent | 2df08ed08c065e8b91bc8df0266bd4bcbb062be4 (diff) | |
| download | karakeep-04572a8e5081b1e4871e273cde9dbaaa44c52fe0.tar.zst | |
structure: Create apps dir and copy tooling dir from t3-turbo repo
Diffstat (limited to '')
| -rw-r--r-- | apps/web/app/api/auth/[...nextauth]/route.tsx (renamed from packages/web/app/api/auth/[...nextauth]/route.tsx) | 0 | ||||
| -rw-r--r-- | apps/web/app/api/trpc/[trpc]/route.ts (renamed from packages/web/app/api/trpc/[trpc]/route.ts) | 2 |
2 files changed, 1 insertions, 1 deletions
diff --git a/packages/web/app/api/auth/[...nextauth]/route.tsx b/apps/web/app/api/auth/[...nextauth]/route.tsx index 2f7f1cb0..2f7f1cb0 100644 --- a/packages/web/app/api/auth/[...nextauth]/route.tsx +++ b/apps/web/app/api/auth/[...nextauth]/route.tsx diff --git a/packages/web/app/api/trpc/[trpc]/route.ts b/apps/web/app/api/trpc/[trpc]/route.ts index b6753101..02ca966d 100644 --- a/packages/web/app/api/trpc/[trpc]/route.ts +++ b/apps/web/app/api/trpc/[trpc]/route.ts @@ -21,7 +21,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 }; |
