testdata.convert

This commit is contained in:
masnn committed 2020-06-13 13:33:37 +08:00
1 parent 26f780ddee
commit 0d7d6ea12a
15 files changed
+199 -127

No files matched your search

+2 -2
View File
@@ -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 = '/';
}
}