mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
update & fix typing, updated examples
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { password as $password, text as $text } from "@clack/prompts";
|
||||
import type { App } from "App";
|
||||
import type { BkndConfig } from "adapter";
|
||||
import type { PasswordStrategy } from "auth/authenticate/strategies";
|
||||
import type { App, BkndConfig } from "bknd";
|
||||
import { makeConfigApp } from "cli/commands/run";
|
||||
import { getConfigPath } from "cli/commands/run/platform";
|
||||
import type { CliCommand } from "cli/types";
|
||||
@@ -37,7 +38,7 @@ async function action(action: "create" | "update", options: any) {
|
||||
async function create(app: App, options: any) {
|
||||
const config = app.module.auth.toJSON(true);
|
||||
const strategy = app.module.auth.authenticator.strategy("password") as PasswordStrategy;
|
||||
const users_entity = config.entity_name;
|
||||
const users_entity = config.entity_name as "users";
|
||||
|
||||
const email = await $text({
|
||||
message: "Enter email",
|
||||
@@ -83,7 +84,7 @@ async function create(app: App, options: any) {
|
||||
async function update(app: App, options: any) {
|
||||
const config = app.module.auth.toJSON(true);
|
||||
const strategy = app.module.auth.authenticator.strategy("password") as PasswordStrategy;
|
||||
const users_entity = config.entity_name;
|
||||
const users_entity = config.entity_name as "users";
|
||||
const em = app.modules.ctx().em;
|
||||
|
||||
const email = (await $text({
|
||||
|
||||
Reference in New Issue
Block a user