From 92b3ec751fdb38004bd20d72226a8f59f65d773e Mon Sep 17 00:00:00 2001 From: silence Date: Sat, 30 Dec 2023 22:15:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(access):=20llm=20=E6=8A=BD=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/auth.ts b/app/api/auth.ts index c7f189bdbb2..716649c6975 100644 --- a/app/api/auth.ts +++ b/app/api/auth.ts @@ -28,7 +28,7 @@ function parseApiKey(bearToken: string) { }; } -export function auth(req: NextRequest, modelProvider: ModelProvider) { +export async function auth(req: NextRequest, modelProvider: ModelProvider) { const authToken = req.headers.get("Authorization") ?? ""; // check if it is openai api key or user token