mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 11:50:33 +08:00
fixup: add more error info
This commit is contained in:
@@ -43,8 +43,7 @@ export function auth(req: NextRequest) {
|
||||
if (serverConfig.needCode && !serverConfig.codes.has(hashedCode) && !token) {
|
||||
return {
|
||||
error: true,
|
||||
needAccessCode: true,
|
||||
msg: "Please go settings page and fill your access code.",
|
||||
msg: !accessCode ? "empty access code" : "wrong access code",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -58,7 +57,7 @@ export function auth(req: NextRequest) {
|
||||
console.log("[Auth] admin did not provide an api key");
|
||||
return {
|
||||
error: true,
|
||||
msg: "Empty Api Key",
|
||||
msg: "admin did not provide an api key",
|
||||
};
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user