better types & use attend instead of enroll

This commit is contained in:
undefined committed 2020-09-07 12:43:09 +08:00
1 parent e7428c8f79
commit 3dd4c1c994
17 files changed
+141 -82

No files matched your search

+2 -2
View File
@@ -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 });