core: fix typings

This commit is contained in:
undefined committed 2021-03-25 22:59:19 +08:00
1 parent 4a613c47d5
commit 9d8f2d28e5
1 file changed
+4 -4
+4 -4
View File
@@ -205,10 +205,10 @@ class SystemUserImportHandler extends SystemHandler {
});
if (!confirm) {
tasks.push(
user.create(email, username, password).then((uid) => {
if (displayName) return domain.setUserInDomain(domainId, uid, { displayName });
return Promise.resolve();
}),
(async () => {
const uid = await user.create(email, username, password);
if (displayName) await domain.setUserInDomain(domainId, uid, { displayName });
})(),
);
}
}