mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +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
@@ -94,7 +94,7 @@ export async function run({
|
||||
for (const udoc of udocs) {
|
||||
if (randomMail) delete udoc.email;
|
||||
let current = await UserModel.getByEmail(domainId, udoc.email || `${udoc.user_id}@hustoj.local`);
|
||||
if (!current) current = await UserModel.getByUname(domainId, udoc.user_id);
|
||||
current ||= await UserModel.getByUname(domainId, udoc.user_id);
|
||||
if (current) {
|
||||
report({ message: `duplicate user with email ${udoc.email}: ${current.uname},${udoc.user_id}` });
|
||||
uidMap[udoc.user_id] = current._id;
|
||||
|
||||
Reference in new issue
Block a user