mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: auto-join system domain
This commit is contained in:
1 parent
e15a310351
commit
b9dbdc39ca
3 files changed
+20
-2
No files matched your search
@@ -336,6 +336,12 @@ class UserModel {
|
||||
priv,
|
||||
avatar: `gravatar:${mail}`,
|
||||
});
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await domain.collUser.updateOne(
|
||||
{ uid, domainId: 'system' },
|
||||
{ $set: { join: true } },
|
||||
{ upsert: true },
|
||||
);
|
||||
return uid;
|
||||
} catch (e) {
|
||||
if (e?.code === 11000) {
|
||||
|
||||
Reference in new issue
Block a user