feat: find user by account (aka userName or userId)

This commit is contained in:
CrescentLeaf
2025-09-25 14:53:53 +08:00
parent efc0f49b66
commit d6454f51c8
2 changed files with 4 additions and 1 deletions

View File

@@ -68,7 +68,7 @@ export default class UserApi extends BaseApi {
code: 400,
}
const user = (User.findByUserName(args.account as string) || User.findById(args.account as string)) as User
const user = User.findByAccount(args.account as string) as User
if (user == null) return {
msg: "賬號或密碼錯誤",
code: 400,