mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
fix: login
This commit is contained in:
@@ -76,11 +76,11 @@ export const validateUser = async (username: string, password: string) => {
|
||||
return null
|
||||
}
|
||||
|
||||
// 查询数据库中的用户
|
||||
// 查询数据库中的用户(使用 username 而不是 id)
|
||||
const [user] = await db
|
||||
.select()
|
||||
.from(users)
|
||||
.where(eq(users.id, userId!))
|
||||
.where(eq(users.username, username))
|
||||
|
||||
if (!user) {
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user