refacts
This commit is contained in:
parent
5f0dfee768
commit
ae114c68db
26 changed files with 99 additions and 38 deletions
|
|
@ -32,7 +32,7 @@ namespace isn.Controllers
|
|||
private readonly ILogger<PackagesController> _logger;
|
||||
private readonly IDataProtector _protector;
|
||||
|
||||
private readonly NugetSettings _nugetSettings;
|
||||
private readonly IsndSettings _isndSettings;
|
||||
readonly ApplicationDbContext _dbContext;
|
||||
private readonly PackageManager _packageManager;
|
||||
private readonly IUnleash _unleashĈlient;
|
||||
|
|
@ -40,13 +40,13 @@ namespace isn.Controllers
|
|||
public PackagesController(
|
||||
ILoggerFactory loggerFactory,
|
||||
IDataProtectionProvider provider,
|
||||
IOptions<NugetSettings> nugetOptions,
|
||||
IOptions<IsndSettings> isndOptions,
|
||||
IUnleash unleashĈlient,
|
||||
ApplicationDbContext dbContext)
|
||||
{
|
||||
_logger = loggerFactory.CreateLogger<PackagesController>();
|
||||
_nugetSettings = nugetOptions.Value;
|
||||
_protector = provider.CreateProtector(_nugetSettings.ProtectionTitle);
|
||||
_isndSettings = isndOptions.Value;
|
||||
_protector = provider.CreateProtector(_isndSettings.ProtectionTitle);
|
||||
_dbContext = dbContext;
|
||||
_packageManager = new PackageManager(dbContext);
|
||||
_unleashĈlient = unleashĈlient;
|
||||
|
|
@ -158,7 +158,7 @@ namespace isn.Controllers
|
|||
[FromRoute] string id, [FromRoute] string lower,
|
||||
[FromRoute] string idf, [FromRoute] string lowerf)
|
||||
{
|
||||
var pkgpath = Path.Combine(_nugetSettings.PackagesRootDir,
|
||||
var pkgpath = Path.Combine(_isndSettings.PackagesRootDir,
|
||||
id, lower, $"{id}-{lower}.nupkg"
|
||||
);
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ namespace isn.Controllers
|
|||
[FromRoute][SafeName][Required] string idf,
|
||||
[FromRoute][SafeName][Required] string lowerf)
|
||||
{
|
||||
var pkgpath = Path.Combine(_nugetSettings.PackagesRootDir,
|
||||
var pkgpath = Path.Combine(_isndSettings.PackagesRootDir,
|
||||
id, lower, $"{id}.nuspec");
|
||||
|
||||
FileInfo pkgfi = new FileInfo(pkgpath);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue