mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix lint error
This commit is contained in:
1 parent
8d7a446066
commit
0300262b73
1 file changed
+2
-2
@@ -218,9 +218,9 @@ class UserRegisterWithCodeHandler extends Handler {
|
|||||||
if (tdoc.phone) tdoc.mail = `${tdoc.phone}@hydro.local`;
|
if (tdoc.phone) tdoc.mail = `${tdoc.phone}@hydro.local`;
|
||||||
const uid = await user.create(tdoc.mail, uname, password, undefined, this.request.ip);
|
const uid = await user.create(tdoc.mail, uname, password, undefined, this.request.ip);
|
||||||
await token.del(code, token.TYPE_REGISTRATION);
|
await token.del(code, token.TYPE_REGISTRATION);
|
||||||
const [id, domain] = tdoc.mail.split('@');
|
const [id, mailDomain] = tdoc.mail.split('@');
|
||||||
const $set: any = {};
|
const $set: any = {};
|
||||||
if (domain === 'qq.com' && !Number.isNaN(+id)) $set.avatar = `qq:${id}`;
|
if (mailDomain === 'qq.com' && !Number.isNaN(+id)) $set.avatar = `qq:${id}`;
|
||||||
if (this.session.viewLang) $set.viewLang = this.session.viewLang;
|
if (this.session.viewLang) $set.viewLang = this.session.viewLang;
|
||||||
if (Object.keys($set).length) await user.setById(uid, $set);
|
if (Object.keys($set).length) await user.setById(uid, $set);
|
||||||
this.session.viewLang = '';
|
this.session.viewLang = '';
|
||||||
|
|||||||
Reference in new issue
Block a user