1
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
public class InstallCommandHandler(
|
||||
IConnectionStringProvider connectionStringProvider,
|
||||
IHttpContextAccessor accessor,
|
||||
IMigratorProvider migratorProvider,
|
||||
IWebHostEnvironment env,
|
||||
IConfigurationService configurationService,
|
||||
@@ -25,6 +26,7 @@
|
||||
private readonly IConfigurationService _configurationService = configurationService;
|
||||
private readonly IWebHostEnvironment _env = env;
|
||||
private readonly IFileService _fileService = fileService;
|
||||
private readonly IHttpContextAccessor _accessor = accessor;
|
||||
public async Task<InstallCommandResponse> Handle(InstallCommand request, CancellationToken cancellationToken)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(_settings.ConnectionString) && !string.IsNullOrEmpty(_settings.DatabaseType) && !string.IsNullOrEmpty(_settings.DatabaseName))
|
||||
@@ -50,6 +52,7 @@
|
||||
|
||||
|
||||
var settings = new BlogSettings();
|
||||
settings.Url = _accessor.HttpContext?.GetCurrentDomain() ?? "";
|
||||
|
||||
settings.DatabaseName = databaseName;
|
||||
settings.DatabaseType = databaseType.ToString();
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Mapster.DependencyInjection" Version="1.0.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Qiniu" Version="8.7.0" />
|
||||
<PackageReference Include="MediatR" Version="12.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user