feat(admincli): add command for creating a user
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
// TODO: We need a way to add
|
||||
// a user to the system with
|
||||
// a properly hashed password
|
||||
// so need something like this:
|
||||
//
|
||||
// 1. Ask for username
|
||||
// 2. Ask for user password
|
||||
// 3. Hash user password
|
||||
// 4. Save user to database
|
||||
|
||||
Console.WriteLine("Hello, World!");
|
||||
await Host.CreateDefaultBuilder(args)
|
||||
.ConfigureAppConfiguration(
|
||||
static c => c.SetBasePath(AppContext.BaseDirectory)
|
||||
.AddJsonFile("appsettings.json")
|
||||
.AddEnvironmentVariables()
|
||||
)
|
||||
.ConfigureLogging(static c => c.ClearProviders())
|
||||
.ConfigureServices(static (_, services) =>
|
||||
{
|
||||
services.AddSingleton(AnsiConsole.Console);
|
||||
services.AddInfrastructure();
|
||||
services.AddHostedService<App>();
|
||||
})
|
||||
.Build()
|
||||
.StartAsync();
|
||||
|
||||
Reference in New Issue
Block a user