More Options refactoring (#2179)

* More Options refactoring

Continues refactoring config classes to use the propert Options pattern where possible.
DataDirectories and DatabaseOptions are now configured the Options pattern and the BTCPayOptions is now moved alongside the other config setup

* Move COnfigure logic for Options to the Startup
This commit is contained in:
Andrew Camilleri
2021-01-06 15:51:13 +01:00
committed by GitHub
parent a18dae6d04
commit 58d01738ab
18 changed files with 179 additions and 234 deletions

View File

@@ -1,7 +1,5 @@
using System.Threading.Tasks;
using BTCPayServer.Configuration;
using BTCPayServer.Storage.Services;
using BTCPayServer.Storage.Services.Providers.FileSystemStorage;
using Microsoft.AspNetCore.Mvc;
namespace BTCPayServer.Storage
@@ -10,12 +8,10 @@ namespace BTCPayServer.Storage
public class StorageController : Controller
{
private readonly FileService _FileService;
private readonly string _dir;
public StorageController(FileService fileService, DataDirectories datadirs)
public StorageController(FileService fileService)
{
_FileService = fileService;
_dir = datadirs.TempStorageDir;
}
[HttpGet("{fileId}")]