mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
eslint: enable extra rules
no-implicit-coercion, no-extra-boolean-cast, no-invalid-this, logical-assignment-operators, no-unmodified-loop-condition
This commit is contained in:
1 parent
5ac9d930b2
commit
7f51df236a
34 files changed
+100
-96
No files matched your search
@@ -209,7 +209,7 @@ class UserModel {
|
||||
const unameLower = uname.trim().toLowerCase();
|
||||
if (cache.has(`name/${unameLower}/${domainId}`)) return cache.get(`name/${unameLower}/${domainId}`) || null;
|
||||
let udoc = await coll.findOne({ unameLower });
|
||||
if (!udoc) udoc = await collV.findOne({ unameLower });
|
||||
udoc ||= await collV.findOne({ unameLower });
|
||||
if (!udoc) return null;
|
||||
const dudoc = await domain.getDomainUser(domainId, udoc);
|
||||
const res = await new UserModel.User(udoc, dudoc).init();
|
||||
|
||||
Reference in new issue
Block a user