fix: #1612 infinite loading

This commit is contained in:
Yidadaa
2023-05-20 19:58:12 +08:00
parent bcb18ff2f4
commit af497c96ec
8 changed files with 90 additions and 84 deletions

View File

@@ -55,10 +55,6 @@ export function auth(req: NextRequest) {
req.headers.set("Authorization", `Bearer ${apiKey}`);
} else {
console.log("[Auth] admin did not provide an api key");
return {
error: serverConfig.baseUrl?.includes(OPENAI_URL),
msg: "admin did not provide an api key",
};
}
} else {
console.log("[Auth] use user api key");