删除 console.log的打印日志
This commit is contained in:
@@ -16,7 +16,6 @@ export async function POST(request: Request) {
|
||||
const body = await request.json()
|
||||
const { phone, password } = loginSchema.parse(body)
|
||||
|
||||
console.log('登录尝试:', phone) // 添加日志
|
||||
|
||||
// 查找用户 - 使用正确的查询方式
|
||||
const user = await prisma.user.findUnique({
|
||||
@@ -25,10 +24,8 @@ export async function POST(request: Request) {
|
||||
},
|
||||
})
|
||||
|
||||
console.log('找到用户:', user) // 添加日志
|
||||
|
||||
if (!user) {
|
||||
console.log('用户不存在:', phone)
|
||||
return NextResponse.json(
|
||||
{ success: false, error: '用户不存在' },
|
||||
{ status: 401 }
|
||||
@@ -37,7 +34,6 @@ export async function POST(request: Request) {
|
||||
|
||||
// 验证密码
|
||||
const passwordMatch = await compare(password, user.password || '')
|
||||
console.log('密码验证结果:', passwordMatch)
|
||||
|
||||
if (!passwordMatch) {
|
||||
return NextResponse.json({
|
||||
|
||||
Reference in New Issue
Block a user