fix some bug
This commit is contained in:
parent
fdb7f256ae
commit
5fbd59b738
@ -22,8 +22,8 @@ class MailController extends BaseController {
|
||||
@role(ROLE_ANON)
|
||||
@router('post /wallet/login/email')
|
||||
async loginWithEmail(req, res) {
|
||||
let { email, pass } = req.params
|
||||
if (!email || !pass) {
|
||||
let { email, password } = req.params
|
||||
if (!email || !password) {
|
||||
throw new ZError(10, 'params mismatch')
|
||||
}
|
||||
// check Account exists
|
||||
@ -34,7 +34,7 @@ class MailController extends BaseController {
|
||||
if (record.locked) {
|
||||
throw new ZError(12, 'account locked')
|
||||
}
|
||||
if (!record.verifyPassword(pass)) {
|
||||
if (!record.verifyPassword(password)) {
|
||||
throw new ZError(13, 'password error')
|
||||
}
|
||||
const token = await res.jwtSign({ id: record.id, openid: record.openId, plat: PlatEnum.EMAIL })
|
||||
|
Loading…
x
Reference in New Issue
Block a user