mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
fix user cli
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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 />;*/
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user