mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
better types & use attend instead of enroll
This commit is contained in:
1 parent
e7428c8f79
commit
3dd4c1c994
17 files changed
+141
-82
No files matched your search
@@ -62,7 +62,7 @@ class UserRegisterHandler extends Handler {
|
||||
this.limitRate('send_mail', 3600, 30);
|
||||
const t = await token.add(
|
||||
token.TYPE_REGISTRATION,
|
||||
await system.get('registration_token_expire_seconds'),
|
||||
await system.get('registration_token_expire_seconds') as number,
|
||||
{ mail },
|
||||
);
|
||||
if (await system.get('smtp.user')) {
|
||||
@@ -118,7 +118,7 @@ class UserLostPassHandler extends Handler {
|
||||
if (!udoc) throw new UserNotFoundError(mail);
|
||||
const [tid] = await token.add(
|
||||
token.TYPE_LOSTPASS,
|
||||
await system.get('lostpass_token_expire_seconds'),
|
||||
await system.get('lostpass_token_expire_seconds') as number,
|
||||
{ uid: udoc._id },
|
||||
);
|
||||
const m = await this.renderHTML('user_lostpass_mail', { url: `lostpass/${tid}`, uname: udoc.uname });
|
||||
|
||||
Reference in new issue
Block a user