mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
testdata.convert
This commit is contained in:
1 parent
26f780ddee
commit
0d7d6ea12a
15 files changed
+199
-127
No files matched your search
@@ -89,7 +89,7 @@ class UserRegisterWithCodeHandler extends Handler {
|
||||
await user.create({
|
||||
uid, uname, password, mail, regip: this.request.ip,
|
||||
});
|
||||
await token.delete(code, token.TYPE_REGISTRATION);
|
||||
await token.del(code, token.TYPE_REGISTRATION);
|
||||
this.session.uid = uid;
|
||||
this.response.redirect = '/';
|
||||
}
|
||||
@@ -129,7 +129,7 @@ class UserLostPassWithCodeHandler extends Handler {
|
||||
if (!tdoc) throw new InvalidTokenError(token.TYPE_LOSTPASS, code);
|
||||
if (password !== verifyPassword) throw new VerifyPasswordError();
|
||||
await user.setPassword(tdoc.uid, password);
|
||||
await token.delete(code, token.TYPE_LOSTPASS);
|
||||
await token.del(code, token.TYPE_LOSTPASS);
|
||||
this.response.redirect = '/';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user