mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-03 00:26:40 +08:00
紧及修复
This commit is contained in:
parent
b1c71f62d3
commit
b9e4df3b52
@ -94,9 +94,9 @@ export const authOptions: NextAuthOptions = {
|
|||||||
let existingUser = await existUser(user); // await insertUser(user)
|
let existingUser = await existUser(user); // await insertUser(user)
|
||||||
if (!existingUser) {
|
if (!existingUser) {
|
||||||
// 如果不存在,则报错
|
// 如果不存在,则报错
|
||||||
throw new Error("用户名或密码不正确")
|
// throw new Error("用户名或密码不正确")
|
||||||
// 如果不存在,则创建
|
// 如果不存在,则创建
|
||||||
// existingUser = await insertUser(user);
|
existingUser = await insertUser(user);
|
||||||
}
|
}
|
||||||
// 有密码就校验密码,没有就直接返回用户
|
// 有密码就校验密码,没有就直接返回用户
|
||||||
(password || existingUser.password) && validatePassword(password, existingUser.password);
|
(password || existingUser.password) && validatePassword(password, existingUser.password);
|
||||||
|
Loading…
Reference in New Issue
Block a user