fix user cli

This commit is contained in:
dswbx
2024-11-21 08:39:04 +01:00
parent c75add2058
commit 2fe924b65c
2 changed files with 5 additions and 3 deletions

View File

@@ -66,17 +66,17 @@ async function create(app: App, options: any) {
try { try {
const mutator = app.modules.ctx().em.mutator(users_entity); const mutator = app.modules.ctx().em.mutator(users_entity);
mutator.__unstable_toggleSystemEntityCreation(true); mutator.__unstable_toggleSystemEntityCreation(false);
const res = await mutator.insertOne({ const res = await mutator.insertOne({
email, email,
strategy: "password", strategy: "password",
strategy_value: await strategy.hash(password as string) strategy_value: await strategy.hash(password as string)
}); });
mutator.__unstable_toggleSystemEntityCreation(false); mutator.__unstable_toggleSystemEntityCreation(true);
console.log("Created:", res.data); console.log("Created:", res.data);
} catch (e) { } catch (e) {
console.error("Error"); console.error("Error", e);
} }
} }

View File

@@ -21,6 +21,8 @@ export function AuthSettingsList() {
navigate(app.getSettingsPath(["auth"])); navigate(app.getSettingsPath(["auth"]));
}, []); }, []);
return null;
/*useBknd({ withSecrets: true }); /*useBknd({ withSecrets: true });
return <AuthSettingsListInternal />;*/ return <AuthSettingsListInternal />;*/
} }